Skip to content

Conversation

@practice-golang
Copy link

Some service provider block personal ip address and some do not give any response.
In my case, naver.com act as waiting villain.

Copy link
Owner

@nilslice nilslice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! To accept this PR, I would prefer that the timeout is passed in to Send, via a context.

Please let me know if you disagree. I'm imagining that you'd set up your Message, then your context.WithTimeout, and then call msg.Send(ctx), where your dialTimeout func gets the timeout from the context.

You could alternatively add a separate method SendContext(ctx) so there is no API change.

@practice-golang
Copy link
Author

Hello @nilslice , sorry for late response.
Ok, I will PR again

@practice-golang
Copy link
Author

practice-golang commented Nov 7, 2018

Hello @nilslice , I requested PR again, could you please check this?

BTW, I'm not sure which is better using context or using variable(not a struct).
I'v tried to wrap context definition code into SendContext function but did not work.

Thank you 😄

@nilslice
Copy link
Owner

Hi, I'm closing this after opening a new PR using your branch as a base. See #4 for more details. Thank you!

@nilslice nilslice closed this Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants