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

Thread pool queue for the canceled subscriptions #61

Closed
yallie opened this issue Nov 27, 2019 · 0 comments
Closed

Thread pool queue for the canceled subscriptions #61

yallie opened this issue Nov 27, 2019 · 0 comments

Comments

@yallie
Copy link
Member

yallie commented Nov 27, 2019

How to reproduce:
https://gist.github.com/yallie/10a166266d5bab61675e1b226c99720f

  1. Connect to server, attach an event handler to the remote event
  2. Fire up a lot of events (like, a million)
  3. Start receiving events from server
  4. Kill the client
  5. Observe the server cancelling broken subscriptions, as designed
  6. All events enqueued before the subscription was canceled are still in the sending queue, and server tries to call canceled subscriptions anyway. Queued thread pool callbacks are processed very slowly because each one of them tries to send the event data to a disconnected client, times out, etc.

The server shouldn't try to route events for the canceled subscriptions.
Also, it should clean up the queued callbacks for the canceled subscriptions as fast as possible.

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