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

Unnecessary high CPU impact due to low default check interval of broken connections #400

Open
jr-dimedis opened this issue Apr 29, 2023 · 1 comment
Assignees
Labels

Comments

@jr-dimedis
Copy link

I am using PeerJS server v1.0.0 and see in the source code that the checkBrokenConnections module runs a timer at 300ms interval which checks for a timeout for all connected clients.

This timeout is by default 60000ms. So I am asking why is it necessary to check for broken connections every 300ms?

I think reducing this to the ping default value of 5000ms would decrease CPU impact significantly and it would catch a client timeout maximum 5 seconds later (worst case) which does make no big difference in my opinion (max. of ~65s timeout instead of ~60.3s timeout).

Or am I missing something here?

@jonasgloning
Copy link
Member

@afrokick chose the setting; maybe he can chime in

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

No branches or pull requests

4 participants