-
Notifications
You must be signed in to change notification settings - Fork 454
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 drain-before-shutdown behavior (fixes #24) #50
Add drain-before-shutdown behavior (fixes #24) #50
Conversation
notification = queue.poll(); | ||
} | ||
|
||
if (notification != null) { | ||
connection.sendNotification(notification); | ||
} else { | ||
if (drainingBeforeShutdown) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can't drain before you send all of your notifications?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retracted
…into drain_retry_queue_before_shutdown Conflicts: src/main/java/com/relayrides/pushy/apns/PushManager.java
…hread on shutdown so it notices that it should be draining the retry queue.
👍 |
@romanzadov Cool -- thanks for the read. Tests are failing, though, so we'll need to get that figured out before moving forward. |
This changes the
PushManager
's shutdown behavior to drain the internal retry queue before gracefully closing connections.