codedge-llc / pigeon

iOS and Android push notifications for Elixir
https://hex.pm/packages/pigeon
MIT License
646 stars 146 forks source link

Restart Dropped iOS Connection After Bad Device Tokens #1

Closed hpopp closed 8 years ago

hpopp commented 8 years ago

Will need to implement some sort of tracking to know which notifications have been sent. In some of my initial testing I found the :ssl_closed message arrives too late for some messages sent after an invalid device token.

idyll commented 8 years ago

Is this still required with the new HTTP/2 API. AFAIK it shouldn't hang up on you for a bad token.

hpopp commented 8 years ago

No, you're right. When I raised this issue I wasn't familiar enough with http2 to realize that each new push needs to happen on a new stream.

I haven't touched this package much since January, but after looking over the code today, I realized APNS pushes are still severely broken. After sending the first push, subsequent ones are ignored because it's not opening a new stream on the connection. I'll fix this, implement #2 and hopefully have a new version on hex by early next week.