Skip to content

Commit 8da5769

Browse files
committed
fix lint
1 parent ade65ef commit 8da5769

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client/pool.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,12 @@ func (pool *Pool) startNewConnections(count int) {
466466

467467
func (pool *Pool) ping(conn *Conn) error {
468468
deadline := time.Now().Add(100 * time.Millisecond)
469-
_ = conn.SetWriteDeadline(deadline)
470-
_ = conn.SetReadDeadline(deadline)
469+
_ = conn.SetDeadline(deadline)
471470
err := conn.Ping()
472471
if err != nil {
473472
pool.logFunc(`Pool: ping query fail: %s`, err.Error())
474473
} else {
475-
conn.SetDeadline(time.Time{})
474+
_ = conn.SetDeadline(time.Time{})
476475
}
477476
return err
478477
}

0 commit comments

Comments
 (0)