Skip to content

Commit

Permalink
fix check failed
Browse files Browse the repository at this point in the history
  • Loading branch information
YanKawaYu authored and erikdubbelboer committed Nov 23, 2018
1 parent 4570d12 commit 8a7123e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1355,8 +1355,10 @@ var clientConnPool sync.Pool
func (c *HostClient) releaseConn(cc *clientConn) {
cc.lastUseTime = time.Now()
//reset read and write deadline for reuse
if cc.c != nil {
if c.ReadTimeout > 0 {
cc.c.SetReadDeadline(time.Time{})
}
if c.WriteTimeout > 0 {
cc.c.SetWriteDeadline(time.Time{})
}

Expand Down

0 comments on commit 8a7123e

Please sign in to comment.