-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
The connection status has failed,Why is the read function still blocking? #2891
Comments
I would also like to ask how to implement timeout for the separated read-write close functions? Or context |
raw, _:= dataChannel.Detach() OnConnectionStateChange: disconnected ❌ for{ raw.Read()...//blocking } Active call dataChannel.Close() ❌ for{ raw.Read()...//blocking } |
@xdeng The Detached DataChannel API isn't popular with many users like this issue. The behavior described here is by design. A PeerConnection that has When the PeerConnection goes to Sorry about the API frustrations. I am not sure of a better way to do this yet :/ |
@Sean-Der Thanks for your answer |
Your environment.
What did you do?
data-channels-detach
What did you expect?
What happened?
The connection status is
OnConnectionStateChange: disconnected
OnConnectionStateChange: failed
dataChannel.Detach() ---> ReadWriteCloser, Why doesn't it fail when reading, but keeps blocking?
Need to call peerConnection.Close(), The read function will fail to exit.
The text was updated successfully, but these errors were encountered: