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

Add disconnect method and fix up Network class #10

Closed
wants to merge 3 commits into from
Closed

Add disconnect method and fix up Network class #10

wants to merge 3 commits into from

Conversation

zbjornson
Copy link
Contributor

⚠️ (This is based on my master branch, which has my two other PRs merged into it.)

Adds a serf.disconnect method that closes the underlying socket, allowing node to gracefully exit.

Also fixes up the network class a bit:

  • Do not call the Network.connect callback more than once. This was being called both after connecting and on any socket errors (the net.on("error"...) handler wasn't actually handling connection errors).
  • Properly isolate members -- make new Socket and EventEmitter instances for each instance of Network. Begins to address RPC is a singleton #5.

(Trying to submit small, isolated PRs, but to do the rest of #5 it will be rather invasive.)

@zbjornson
Copy link
Contributor Author

@normanjoyner any thoughts on these three PRs?

Happy to be a formal contributor if you want to add me to this repo (or transfer it to me). Have a few more changes (including what may be a critical bugfix for large serf clusters) ahead.

@zbjornson zbjornson closed this Aug 27, 2017
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.

1 participant