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

Handle better reconnects #48

Closed
m1k1o opened this issue Apr 16, 2021 · 4 comments
Closed

Handle better reconnects #48

m1k1o opened this issue Apr 16, 2021 · 4 comments
Labels
discussion Discussion topic help wanted Extra attention is needed

Comments

@m1k1o
Copy link
Owner

m1k1o commented Apr 16, 2021

Reconnects are annoying. It happens often with weak/instable connections. After reconnect it works again, however, when watching video you miss 3 - 6 seconds.

Reconnects should be better understood, why they happen and what could be done to prevent them. Since I watch video without any visible problems, and after reconnect that video works again, network must be good enough. Maybe some timers are there, that expire or kick user out in some weird edge case scenarios.

Temporary network problems should be handled gracefully. If possible (in Pion).

@m1k1o
Copy link
Owner Author

m1k1o commented Apr 16, 2021

To simulate bad network conditions, this command can be used:

tc qdisc add dev eth0 root netem delay 200ms 330ms 22.00% distribution paretonormal loss 18.00% 30.00% corrupt 32.00% 88.00% duplicate 14.00% 55.00% reorder 63.00% 44.00% gap 55

@mbattista
Copy link
Contributor

The only timer I could think of would be the websocket after 5 seconds.

So you have any console and neko logs of a disconnect?

@m1k1o
Copy link
Owner Author

m1k1o commented Apr 18, 2021

The logs do not say anything at all. Nor on client or on server (even with debug on). Just that peer connection closed.

Websocket is fine, only WebRTC seems to fail. But if that disconnects, then also websocket is reconnected.

I've been thinking about implementing ICE Restart (new in pion v3), maybe that could help.

@m1k1o
Copy link
Owner Author

m1k1o commented Nov 20, 2021

Testing for some months, number of reconnects dropped to almost zero. Considering this issue as fixed.

@m1k1o m1k1o closed this as completed Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion topic help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants