Handshake is setting DialTimeout instead of context deadline#1709
Handshake is setting DialTimeout instead of context deadline#1709NamanMahor wants to merge 9 commits intoClickHouse:mainfrom
Conversation
|
@NamanMahor thanks for the PR :). I know it's a simple change. can you please add tests for this to avoid any regression in the future? |
|
@kavirajk sure will add the test. I have one question which could also be bug. we are overriding the ctx with timeout/deadline here https://github.com/ClickHouse/clickhouse-go/blob/main/clickhouse.go#L304 which is being used by |
The way I see it, we have i'm curious what is your use case here?. You trying to set this timeout more dynamically only on the |
|
@kavirajk sorry about late response totally miss this one. I have added the test. |
Summary
If a user provides a context.Context with a timeout, it is ignored here in conn_handshake.go even though comment is correct to set
context level deadline override any read deadlinebut instead of deadline we are setting Dialtimeout.Made change to handle context deadline as we are already doing in here in conn_ping.go