Skip to content

Commit 9951ace

Browse files
undo the actions of previous commit
1 parent e8f835c commit 9951ace

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clickhouse.go

+5
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ 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 {
261266
case <-timer.C:
262267
return nil, ErrAcquireConnTimeout
263268
case <-ctx.Done():

0 commit comments

Comments
 (0)