django-ios-notifications icon indicating copy to clipboard operation
django-ios-notifications copied to clipboard

APNS Error Handling

Open andrewkowalik opened this issue 11 years ago • 3 comments

APNService class | _write_message

Since APNS socket connection is not synchronous should we not be restarting at the device that failed based on the return message from APNS and not at the current device we are iterating over?

I might be misunderstanding how error handling happens when we call send on the APNS connection. It seems to me that since the error will lag behind our processing server side we will be catch the error on the wrong device leading to skipping a number of devices between the one that closed the connection and the one we are currently processing.

andrewkowalik avatar Oct 22 '13 22:10 andrewkowalik

The Apple docs describe very well how errors should be handled to have robust error handling. (https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG44)

mbargiel avatar Nov 11 '13 19:11 mbargiel

Yes its a decent reference.

Unfortunately I do not think it answers my question about how this library handles errors.

andrewkowalik avatar Nov 14 '13 02:11 andrewkowalik

Agreed. That's more a reference as to how this library should handle errors. Currently, I think the issue that you raised is valid and should be addressed.

mbargiel avatar Nov 14 '13 03:11 mbargiel