-
Notifications
You must be signed in to change notification settings - Fork 215
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 synchronous calls for sending messages. #77
Comments
What if we somehow make the retries internal? We can queue up send requests in, say… an ets… from which the |
That might be a good idea. I was also thinking about simply handling the |
Ok, please send a PR our way but be careful to properly manage the scenario where the network is down as well (it might look similar to a disconnection from apple). |
One more question. |
Adding that library would be great for tests! I like it |
Sending too many devices with wrong device ids causes closing socket by APNS server, which in turn crashes
apns_connection
gen_server
.The carsh is not a big deal, because
apns_connection
is supervised, butsend
function is usinggen_server:cast
, so when the server crashes, all messages that were queued in process mailbox are gone and we don't know, what messages were there.My solution to this problem would be to add
gen_server:call
doing exactly the same thing - sending messages, but because it is synchronous, we might be sure that:If you think, this is a good idea, I can make a pull request, but it would be great to fix #71 before that.
Otherwise, it is a little bit hard to test, if everything is working correctly.
If you can think of a better solution, I am open.
The text was updated successfully, but these errors were encountered: