Handle nil pointer of response struct to avoid crash
This commit is contained in:
parent
e07847e3ea
commit
88b0263bb8
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue