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

Server 'closed' event never emitted #7

Closed
tehnorm opened this issue Nov 27, 2019 · 5 comments
Closed

Server 'closed' event never emitted #7

tehnorm opened this issue Nov 27, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@tehnorm
Copy link

tehnorm commented Nov 27, 2019

I appreciate you writing this lib - it really fits the bill for our use case for domain socket communication in node.

Had a server hang on me when trying to call Server.close() and listening for the closed event to confirm shutdown. After some digging it looks like a possible typo:

https://github.com/crussell52/node-socket-ipc/blob/master/src/index.js#L231

Should this emit a closed event to match the API docs? Currently a close event is being emitted. Good-ole missing one character bugs!

@crussell52
Copy link
Owner

@tehnorm Thanks for the report! Glad the package is useful :) I'm traveling today, but I will check it out as soon as I can.

How would you feel about me generally supporting the close event to be more consistent with the norm? I would continue to emit closed as well for Client and Server, but effectively deprecate it for removal in 1.0.

@tehnorm
Copy link
Author

tehnorm commented Nov 27, 2019

@crussell52, thanks for the quick response! No worries - it is the travel season. For now, I'm just listening to the close event. I don't have a strong opinion about event names, other than they match the docs.

crussell52 pushed a commit that referenced this issue Nov 28, 2019
`closed` event is now emitted, but also deprecated in favor of more
familiar `close` event. For now, both will be emitted, in `v1.0.0` the
`closed` event will be removed.
crussell52 added a commit that referenced this issue Nov 28, 2019
Server 'closed' event documented but never emitted (#7)
@crussell52
Copy link
Owner

crussell52 commented Nov 28, 2019

Should be fixed in v0.3.0, feel free to reopen if the problem persists.

@crussell52 crussell52 added the bug Something isn't working label Nov 28, 2019
@tehnorm
Copy link
Author

tehnorm commented Nov 28, 2019

Thanks @crussell52

@crussell52
Copy link
Owner

@tehnorm no worries. Just heads up. closed will now work, but I did deprecate it for removal in v1.0 (unscheduled) in favor of close on both Client and Server

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
None yet
Development

No branches or pull requests

2 participants