Skip to content

Commit e8f835c

Browse files
remove unnecessary select in the beginning of acquire
1 parent 2fc5dd8 commit e8f835c

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

clickhouse.go

-5
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,6 @@ func (ch *clickhouse) acquire(ctx context.Context) (conn *connect, err error) {
258258
timer := time.NewTimer(ch.opt.DialTimeout)
259259
defer timer.Stop()
260260
select {
261-
case <-ctx.Done():
262-
return nil, ctx.Err()
263-
default:
264-
}
265-
select {
266261
case <-timer.C:
267262
return nil, ErrAcquireConnTimeout
268263
case <-ctx.Done():

0 commit comments

Comments
 (0)