diff --git a/weed/util/net_timeout.go b/weed/util/net_timeout.go index ef49a9d38..9aeb5cd48 100644 --- a/weed/util/net_timeout.go +++ b/weed/util/net_timeout.go @@ -41,7 +41,7 @@ type Conn struct { // extendDeadline extends the connection deadline from now. // This implements "no activity timeout" - any activity keeps the connection alive. func (c *Conn) extendDeadline() error { - if c.Timeout != 0 { + if c.Timeout > 0 { return c.Conn.SetDeadline(time.Now().Add(c.Timeout)) } return nil