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

Cleanup idle NodeHandlers #70

Open
iand opened this issue Oct 24, 2023 · 0 comments · May be fixed by #71
Open

Cleanup idle NodeHandlers #70

iand opened this issue Oct 24, 2023 · 0 comments · May be fixed by #71
Labels
bug Something isn't working

Comments

@iand
Copy link
Contributor

iand commented Oct 24, 2023

The NetworkBehaviour maintains a map of NodeHandler but entries are never deleted from this map. Each NodeHandler maintains a goroutine to process events from other state machines that want to send messages to the node. Deleting an idle NodeHandler from the map is safe since its only state is the queue of events waiting to be processed.

A NodeHandler should be removed from the map when:

  1. the node is removed from the routing table
  2. no communication has been requested for a configurable period of time

When the NodeHandler is deleted the goroutine servicing its work queue should also be stopped.

@iand iand added the bug Something isn't working label Oct 24, 2023
@iand iand linked a pull request Oct 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Unplanned
Development

Successfully merging a pull request may close this issue.

1 participant