Set timeout for custom dialer. #1035
Merged
Conversation
connector.go
Outdated
|
||
dialCtx = dctx | ||
} | ||
|
zjj
Nov 20, 2019
•
Author
Contributor
updated, feeling something weird, It seems to have to move all them insied
connector.go
Outdated
} else { | ||
nd := net.Dialer{Timeout: mc.cfg.Timeout} | ||
mc.netConn, err = nd.DialContext(ctx, mc.cfg.Net, mc.cfg.Addr) | ||
mc.netConn, err = nd.DialContext(ctx, mc.cfg.Net, mc.cfg.Addr) // for DialContext shall be ctx, not dialCtx |
zjj
Nov 20, 2019
•
Author
Contributor
yes, this explains why the dialctx not passed to DialContext, for later puller could get some info.
if you can't accept this redundant comment, I would comit another patch to remove this comment.
remove ?
methane
Nov 20, 2019
Member
this explains why the dialctx not passed to DialContext, for later puller could get some info.
Read the comment. It doesn't explain why. And the code tells why cleary.
So this comment is just a noise. Please remove it.
"Added myself / the copyright holder to the AUTHORS file" |
AUTHORS
Outdated
@@ -86,6 +86,7 @@ Xiangyu Hu <xiangyu.hu at outlook.com> | |||
Xiaobing Jiang <s7v7nislands at gmail.com> | |||
Xiuming Chen <cc at cxm.cc> | |||
Zhenye Xie <xiezhenye at gmail.com> | |||
Jiajia Zhong <zhong2plus at gmail.com> |
sthagen
added a commit
to sthagen/mysql
that referenced
this pull request
Nov 21, 2019
Set timeout for custom dialer. (go-sql-driver#1035)
bitcoinbarron2
added a commit
to bitcoinbarron2/mysql
that referenced
this pull request
Feb 18, 2020
This reverts commit 15462c1.
tz70s
added a commit
to tz70s/mysql
that referenced
this pull request
Sep 5, 2020
tz70s
added a commit
to tz70s/mysql
that referenced
this pull request
Sep 5, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Description
the dial ctx shall be something todo with the cfg.Timeout
Checklist