You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ctx, _:=context.WithDeadline(mdm.ctx, time.Unix(0, 0))
_, _, err=ws.Read(ctx) // failed to get reader: context deadline exceeded_, _, err=ws.Read(context.Background()) // failed to get reader: WebSocket closed: read timed out: context deadline exceeded
From my understanding, the first context expiring is causing the websocket to close, which I believe is not correct. The same happens if you try to write after the first read, which is the use case I need (read until a timeout, and then send a message).
If this is the expected behaviour would be great to at least have it documented.
The text was updated successfully, but these errors were encountered:
joaohaas
changed the title
Read propagates context
Read context expiring closes websocket
Apr 8, 2021
From my understanding, the first context expiring is causing the websocket to close, which I believe is not correct. The same happens if you try to write after the first read, which is the use case I need (read until a timeout, and then send a message).
If this is the expected behaviour would be great to at least have it documented.
The text was updated successfully, but these errors were encountered: