-
-
Notifications
You must be signed in to change notification settings - Fork 20
Can't send message on negotiated DataChannel #61
Description
Hello,
I've been trying to set up a connection over a data channel using a negotiated id, but I haven't had much success. The connection will open, but I'm unable to send data channel messages between the endpoints for some reason.
I often see these warnings in the log:
[... DEBUG rtc::peer_connection::handler::sctp] sctp data channel set threshold Low(0) for stream id 5
[... WARN rtc::peer_connection::handler] SctpHandler.handle_write got error: Stream not existed
After digging through the rtc crates sources for a bit, I found that making a small change solves the issue. On this line:
https://github.com/webrtc-rs/rtc/blob/master/rtc-datachannel/src/data_channel/mod.rs#L74
negating the conditional (ie, pushing the DataChannelOpen on a negotiated channel) solves the issue and the two endpoints can exchange data channel messages with no problems.
Is this the right change to make in this case? Or would that change cause problems for non-negotiated channels?
Thanks,
Jeff