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

Exception reporting not working for multiple payloads #228

Open
GoogleCodeExporter opened this issue Feb 16, 2016 · 0 comments
Open

Exception reporting not working for multiple payloads #228

GoogleCodeExporter opened this issue Feb 16, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create 2 payloads with the first having an invalid device token
2. Send the payloads using thread/queue method so they are sent one after 
another
3. No exception is returned in the first pushed notification object. The second 
payload won't have actually been sent. (no notice for that)

What is the expected output? What do you see instead?
I would expect an exception in the first pushed notification object returned as 
well as the second payload to be sent successfully by reconnecting to the apple 
pns server.

What version of the product are you using? On what operating system?
javapns 2.2 - Windows 7


Please provide any additional information below.
If the payload queue size is only 1 and the payload has an invalid device token 
then the exception reporting works fine.  It seems to break beyond more than 
one payload at a time.  According to the Apple documentation - "If you send a 
notification that is malformed or otherwise unintelligible, APNs returns an 
error-response packet and closes the connection. Any notifications that you 
sent after the malformed notification using the same connection are discarded, 
and must be resent." from 
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Concept
ual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid
/TP40008194-CH101-SW1 
I think the proper way to solve this problem is to check the socket for 
incoming data after each payload is sent or else the connection is closed and 
when you go to retrieve the error response a socket exception is thrown.

Original issue reported on code.google.com by jgoodfel...@gmail.com on 7 Jan 2015 at 3:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant