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

Prune list of stale subscriptions #227

Merged
merged 5 commits into from
Jan 2, 2024
Merged

Prune list of stale subscriptions #227

merged 5 commits into from
Jan 2, 2024

Conversation

slowbackspace
Copy link
Contributor

@slowbackspace slowbackspace commented Jan 2, 2024

We keep track of subscribed clients by storing them in an array. When client disconnects its subscription should be removed from the array. The problem is that not all types of disconnection are caught by "close" event resulting in array of clients subscriptions getting larger and larger.

This PR synchronizes the subscription lists with the actual list of connection websocket clients.

  • misc: added client id to every log
  • misc: migrated from pnp to node-modules as we had trouble deploying master branch with pnp

@slowbackspace slowbackspace changed the title Fix/clients list Prune list of stale subscriptions Jan 2, 2024
@slowbackspace slowbackspace marked this pull request as ready for review January 2, 2024 13:46
@vladimirvolek vladimirvolek merged commit 10a13a8 into master Jan 2, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants