-
Notifications
You must be signed in to change notification settings - Fork 378
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
Read and Write timeouts? #156
Comments
I have also been having issues with |
There is a |
No.
In some applications we wish to control the amount of time we wait for a
message to be read or written.
At the lowest level this means setting the read/write deadline on the
read/write calls to the underlying socket.
Unfortunately, golang in general does not expose this stuff in a very
useful way, but the current design of gobwas makes it painful to
implement this stuff. E.g., you have to launch a new goroutine to do the
gobwas read and write the result to a channel; then you have to select
the channel along with a new timeout context.Done() and if the context
completes before the gobwas read, you abort the operation.
It's a lot of extra processing just to have timeouts on the read/write
calls.
…On 5/24/23 6:58 AM, Oleg Kovalov wrote:
There is a |HTTPUpgrader.Timeout| field which sets timeout for the
dial. Is this you're asking for?
—
Reply to this email directly, view it on GitHub
<#156 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZHTCZK7SFHNFDURCNIILTXHYHXTANCNFSM6AAAAAASGFOW3I>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The issue appears only when using Using |
Setting the timer can only be done once. Any update silently disables/breaks the functionality, whether disabled with a zero |
The follow is not clear from the documentation and not immediately apparent in the code:
Does this ws library respect the HttpServer WriteTimeout & other timeouts set on the writer that is upgraded to a gobwas/ws ?
If not, can this be added as a feature? Implementing timeouts externally is possible but wordy.
E.g. Specifically if WriteServerMessage() is called, will it block forever if the underlying transport is blocked?
The text was updated successfully, but these errors were encountered: