Skip to content

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