Skip to content

Commit

Permalink
increase timeout and check eof
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 committed Jun 13, 2024
1 parent 0afd9fd commit 4b2db5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions zboxcore/sdk/deleteworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sdk
import (
"context"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
Expand Down Expand Up @@ -78,6 +79,10 @@ func (req *DeleteRequest) deleteBlobberFile(
cncl()

if err != nil {
if err == io.EOF {
shouldContinue = true
return
}
logger.Logger.Error(blobber.Baseurl, "Delete: ", err)
return
}
Expand Down
2 changes: 1 addition & 1 deletion zboxcore/sdk/filerefsworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (o *ObjectTreeRequest) getFileRefs(oTR *oTreeResponse, bUrl string) {
return
}
oResult := ObjectTreeResult{}
ctx, cncl := context.WithTimeout(o.ctx, time.Second*30)
ctx, cncl := context.WithTimeout(o.ctx, 2*time.Minute)
err = zboxutil.HttpDo(ctx, cncl, oReq, func(resp *http.Response, err error) error {
if err != nil {
l.Logger.Error(err)
Expand Down

0 comments on commit 4b2db5a

Please sign in to comment.