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

Not all relayed tracks received due to race condition #673

Open
fffilimonov opened this issue Dec 21, 2022 · 0 comments
Open

Not all relayed tracks received due to race condition #673

fffilimonov opened this issue Dec 21, 2022 · 0 comments

Comments

@fffilimonov
Copy link

Your environment.

  • Version: daf197a
  • Client: daf197a
  • Environement: macOS
  • Are you using a TURN server? no

What did you do?

Trying to relay tracks between 2 ion-sfu

What did you expect?

Tracks relayed

What happened?

I do:

Peer.Publisher().Relay(...)
session.AddRelayPeer(peerID string, signalData []byte) ([]byte, error)

sometimes first relayed track from SFU1 not received on SFU2

I found the root cause:
SFU1 call createRelayTrack after OnOpen event for dataChannel created between SFU1 and SFU2
it leads to sending message via dataChannel to SFU2 with ion_relay_request for this track
sometimes SFU2 receives message ion_relay_request from dataChannel before OnOpen fired on SFU2 and NewRelayPeer called
it leads to calling receive with no onTrack handlers set

As I understand OnOpen for dataChannel on SFU1 side and OnOpen on SFU2 not synchronized.

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