Skip to content

Commit

Permalink
Merge pull request #1753 from 0chain/fix/tcp-timeout
Browse files Browse the repository at this point in the history
Increase tcp dial timeout
  • Loading branch information
dabasov authored Feb 19, 2025
2 parents 55f7c52 + a0b02f4 commit 2f5843a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zboxcore/sdk/chunked_upload_chunk_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (r *chunkedUploadChunkReader) Next() (*ChunkData, error) {
}

if CurrentMode == UploadModeHigh {
r.hasherDataChan <- chunkBytes
r.hasherDataChan <- chunkBytes[:readLen]
} else {
_ = r.hasher.WriteToFile(chunkBytes)
}
Expand Down
4 changes: 2 additions & 2 deletions zboxcore/zboxutil/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ func init() {
DisableHeaderNamesNormalizing: true, // If you set the case on your headers correctly you can enable this
DisablePathNormalizing: true,
// increase DNS cache time to an hour instead of default minute
Dial: (&fasthttp.TCPDialer{
DialTimeout: (&fasthttp.TCPDialer{
Concurrency: 4096,
DNSCacheDuration: time.Hour,
}).Dial,
}).DialTimeout,
ReadTimeout: 180 * time.Second,
WriteTimeout: 180 * time.Second,
MaxConnDuration: 45 * time.Second,
Expand Down

0 comments on commit 2f5843a

Please sign in to comment.