timehop / apns

A Go package to interface with the Apple Push Notification Service
https://godoc.org/github.com/timehop/apns
MIT License
185 stars 47 forks source link

Failednotifs #55

Closed pjebs closed 9 years ago

pjebs commented 9 years ago

When Failednotifs has objects, do I have to use the send command to attempt to resend?

nathany commented 9 years ago

timehop/apns automatically buffers the last 50 notifications and resends them if an error occurs (the notifications after the error)

pjebs commented 9 years ago

What if there were more than 50 notifications after the error occurred? Are they lost forever?

nathany commented 9 years ago

At the moment, yes, it's a circular buffer so the most recent are kept. The code does continuously read off the socket for errors from Apple, so it should be more responsive than waiting for a write to fail.

Also, if the Go process you are running crashes, that buffer disappears.

See #47 for some real world issues as of late.