Skip to content
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

Messages sent from client right after DataChannel opened are lost at videobridge #669

Open
nojz opened this issue May 24, 2018 · 0 comments

Comments

@nojz
Copy link

nojz commented May 24, 2018

Expected result:

  1. Client A is connected to the videobridge, everything is established.
  2. Client B connects to videobridge with DataChannel enabled.
  3. Handshake is completed and DataChannel open callback is fired at Client B.
  4. Client B sends message and videobridge accepts it and forwards it to Client A.
  5. Client A gets the message.
  6. Further messages are sent perfectly.

Actual result:

  1. Client A is connected to the videobridge, everything is established.
  2. Client B connects to videobridge with DataChannel enabled.
  3. Handshake is completed and DataChannel open callback is fired at Client B.
  4. Client B sends message but videobridge drops it so Client A does not receive the message.
  5. Client B sends message after a few seconds and Client A receives it through videobridge.
  6. Further messages are sent perfectly.

Why videobridge drops the "early" messages?
As far as I see the problem is around SctpConnection.java where the client handshake is completed on different thread than calling notifySctpConnectionReady which sets the callback for receiving messages.
So the handshake completes earlier and on the other thread the callback is set too late. If the client sends message between these then that message is dropped/lost.

Right now we use a sleep workaround but of course it's inefficient, ugly and in theory could be unreliable.
Could you take a look at this problem please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant