-
Notifications
You must be signed in to change notification settings - Fork 216
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
Handling 'DOWN' connection when sending message using send_message #47
Comments
If you send a message and the connection is down, maybe your token is not valid. What do you see in the logs? |
I was just looking at the unit test and saw code I mentioned above. It got me thinking. I was just trying to understand what should be the behavior when the connection does go down for some reason. What be the role of supervisor in this case? |
I get this error on pans:connect 2015-02-27 17:13:33.767 [info] <0.7.0> Application apns started on node ejabberd@localhost 2015-02-27 17:13:33.779 [error] <0.380.0> CRASH REPORT Process <0.380.0> with 1 neighbours exited with reason: call to undefined function crypto:supports() in gen_server:init_it/6 line 330 EDIT: I could resolve the above issue by: |
I am able to use apns4erl successfully...I may have other architecture questions...I will ask in separate ticket Thank you all for your help and support.....can not be expressed in words!!!!!!!!!!!!! |
I observe following code in test_suite:
receive
{'DOWN', Ref, _, _, _} = DownMsg ->
throw(DownMsg);
DownMsg ->
throw(DownMsg)
after 1000 ->
ok
end,
If I understand this correctly (new to Erlang) its looking for "DOWN" message which will come as part of connection monitoring if the connection goes down - Ref = erlang:monitor(process, Pid),
Please guide me to understand this better.
The text was updated successfully, but these errors were encountered: