File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3131// PerWriteWriteTimeout timeout for writes
3232const PerWriteWriteTimeout = 30 * time .Second
3333
34- // PerWriteWriteTimeoutKbRate is a timeout taking account of how much there is to be written
35- const PerWriteWriteTimeoutKbRate = 2 * time .Second
34+ // PerWriteWriteTimeoutKbTime is a timeout taking account of how much there is to be written
35+ const PerWriteWriteTimeoutKbTime = 10 * time .Second
3636
3737func init () {
3838 DefaultMaxHeaderBytes = 0 // use http.DefaultMaxHeaderBytes - which currently is 1 << 20 (1MB)
@@ -259,7 +259,7 @@ type wrappedConn struct {
259259
260260func (w wrappedConn ) Write (p []byte ) (n int , err error ) {
261261 if PerWriteWriteTimeout > 0 {
262- minTimeout := time .Duration (len (p )/ 1024 )* PerWriteWriteTimeoutKbRate
262+ minTimeout := time .Duration (len (p )/ 1024 ) * PerWriteWriteTimeoutKbTime
263263 minDeadline := time .Now ().Add (minTimeout ).Add (PerWriteWriteTimeout )
264264
265265 w .deadline = w .deadline .Add (minTimeout )
You can’t perform that action at this time.
0 commit comments