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
I set up a handler for OnDataConnection on the PeerConnection struct. This handler checks a few things to see if it's interested in the data channel or not. If it decides that it isn't interested it calls dataChannel.Close(). Otherwise, it sets up the OnOpen and OnMessage handlers.
What did you expect?
I expected the data channel to close on both sides of the connection immediately.
What happened?
The data channel's state went from connecting to open and stayed open. The call to dataChannel.Close() returns a nil error.
If I put the logic in the OnOpen handler it works. But I would've expected an error from Close() or for it to work no matter when it is called.
The text was updated successfully, but these errors were encountered:
Your environment.
What did you do?
I set up a handler for OnDataConnection on the PeerConnection struct. This handler checks a few things to see if it's interested in the data channel or not. If it decides that it isn't interested it calls dataChannel.Close(). Otherwise, it sets up the OnOpen and OnMessage handlers.
What did you expect?
I expected the data channel to close on both sides of the connection immediately.
What happened?
The data channel's state went from connecting to open and stayed open. The call to dataChannel.Close() returns a nil error.
If I put the logic in the OnOpen handler it works. But I would've expected an error from Close() or for it to work no matter when it is called.
The text was updated successfully, but these errors were encountered: