-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResponseTimeout is not configurable on per message basis #43
Comments
Also, I can notice that in the This timeout must be modifiable, as we might decide to wait on receive for a long time in a separate goroutine (we observe some value and we do not know in which moment the value will come - after 2 seconds or after 10 minutes...) |
1. changed examples to use this package 2. response timeout issue is recorded in original repo at dustin#43
Hi, I generally don't contribute to github, so I am not sure how it all works. I have my own fork where I have addressed the issue, because our solution requires a control over response timeout at client level. Here is a single commit where I address the issue. I have added a test case to verify that I have addressed timeout: The solution I chose is backwards compatible, but it introduces new variant of Dial function. I added a variable to track timeout parameter. I have renamed original ResponseTimeout to be DefaultResponseTimeout, because I wanted to make sure I've got all use cases and because its meaning is to be the default. I am personally not sure if it would've been better to request for timeout as an argument to Send call. Compatibility and simplicity of API won over and I added response timeout to Connection structure instead. If there is an interest in merge, I will request a pull for merge. |
I'd *really* like to figure out how to get context.Context plumbed through
all this. This codebase predates it, so maybe this would warrant a V2, but
context solves all of the timeout problems and communication of timeouts as
well as explicit cancellations in a clear and consistent (but incompatible)
way. I think it's the right way moving forward. Comments?
…On Tue, Jun 6, 2017 at 4:08 PM Kulak ***@***.***> wrote:
Hi,
I generally don't contribute to github, so I am not sure how it all works.
I have my own fork where I have addressed the issue, because our solution
requires a control over response timeout at client level.
Here is a single commit where I address the issue. I have added a test
case to verify that I have addressed timeout.
The solution I chose is backwards compatible, but it introduces new
variant of Dial function. I added a variable to track timeout parameter. I
have renamed original ResponseTimeout to be DefaultResponseTimeout, because
I wanted to make sure I've got all use cases and because its meaning is to
be the default.
I am personally not sure if it would've been better to request for timeout
as an argument to Send call. Compatibility and simplicity of API won over
and I added response timeout to Connection structure instead.
If there is an interest in merge, I will request a pull for merge.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAG88Dca7cg-3s6tBRlUVLcEr4u47mpks5sBdvtgaJpZM4NA95G>
.
|
Context is a very good approach. I did not even think about it as I don't usually use it because of similar reason of code base older than context. I've used context concept in .NET apps and it is a great solution to many issues with logical operation context. |
@dustin I definitely agree that utilizing |
* fix multicast write for windows - multicast client now listen on free port to avoid share it among other clients - join group to all OS interfaces when provided interfaces are nil - fix noresponse test
ResponseTimeout const control message response timeout and it is set to 2 seconds.
While 2 seconds timeout is ok for 1st message, when message is re transmitted the timeout value needs to be increased. Thus, we need to be able to supply custom ResponseTimeout with the request data as it appears to be a higher level function in this API design.
The text was updated successfully, but these errors were encountered: