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

Update connection.js to support a "shutdown" command #134

Closed
wants to merge 3 commits into from

Conversation

ejc3
Copy link
Contributor

@ejc3 ejc3 commented Oct 30, 2013

This change adds a shutdown method to Connection that indicates to socketDrained that it should close connections once there are no more notifications to send. This allows APN to be run as part of a standalone program (e.g. a program that reads a list of notifications from a file). I've tested the change both with all successful messages, as well as when a few messages can't be sent. In both cases, the program does not shutdown until all messages that can be successfully sent are sent.

This change adds a shutdown method that indicates to socketDrained that it should close connections once there are no more notifications to send. The side effect is that the node process will end. I've tested the change both with all successful messages, as well as when a few messages can't be sent. In both cases, the program does not shutdown until all messages that can be successfully sent our sent.
fix spelling mistake
@rbadillo
Copy link

When are you merging this change ? Let us know please

@blaiprat
Copy link

+1 to this modification

@argon argon closed this in 38c0800 Nov 18, 2013
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.

None yet

3 participants