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

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

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.

ejc3 added some commits Oct 30, 2013

Update connection.js to support a "shutdown" command
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.
Update connection.js
fix spelling mistake

When are you merging this change ? Let us know please

+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