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

Fix issue 173 relating to zombie connections from Socket #176

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rnbrady
Copy link

@rnbrady rnbrady commented Feb 13, 2020

Fixes #173 by adding a small enum-based state machine to track whether an instance is initialised and if so what connection type (socket.io vs BitSocket) it is being used for.

Once an instance is of a certain type, queries of the other type or queries of same type that require a new connection will throw an error. This ensures that at most one connection exists at any time so that calling close() results in zero open connections.

Copy link

@SpicyPete SpicyPete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like great changes, thank you for submitting these!

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.

Investigate Bitbox Socket Issue
2 participants