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

[Bug]: Sample session is closed on master side after viewer disconnection #2057

Open
2 tasks done
skndi opened this issue Sep 26, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working needs-triage

Comments

@skndi
Copy link

skndi commented Sep 26, 2024

Please confirm you have already done the following

  • I have searched the repository for related/existing bug reports
  • I have all the details the issue requires

Describe the bug

When a viewer disconnection is detected the stream is closed immediately instead of waiting for a reconnection.

Expected Behavior

The session should not be destructed before ICE_CONNECTION_STATE_FAILED is reached.

Current Behavior

https://gist.github.com/skndi/95bb6a5548905fecd0de9ea7745e0742

The behavior seems to come from this line

ATOMIC_STORE_BOOL(&pSampleStreamingSession->terminateFlag, TRUE);
I think the session should be marked for termination only if the new state is RTC_PEER_CONNECTION_STATE_FAILED or RTC_PEER_CONNECTION_STATE_FAILED.

Reproduction Steps

  1. Start a session between master/viewer
  2. Prevent the viewer from sending heartbeat messages, e.g. stop internet connection on viewer side
  3. Observe the session is closed immediately when disconnection is sensed

WebRTC C SDK version being used

1.10.2

Compiler and Version used

gcc 10.2

Operating System and version

Embedded Linux

Platform being used

Ambarella CV2 chip, aarch64

@skndi skndi added bug Something isn't working needs-triage labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant