mirror of
https://github.com/rclone/rclone.git
synced 2024-11-21 16:03:29 +01:00
Handle nil pointer of response struct to avoid crash
This commit is contained in:
parent
51b049d3ba
commit
9ab41984ab
@ -31,6 +31,9 @@ func (u *Uploader) NotifyUploadProgress(c chan Upload) {
|
||||
}
|
||||
|
||||
func (f *Fs) shouldRetryChunk(ctx context.Context, resp *http.Response, err error, newOff *int64) (bool, error) {
|
||||
if resp == nil {
|
||||
return true, err
|
||||
}
|
||||
|
||||
switch resp.StatusCode {
|
||||
case 204:
|
||||
|
Loading…
Reference in New Issue
Block a user