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

Can't find how to trigger handle_disconnect during process initilization. #52

Open
artempankov opened this issue Mar 4, 2018 · 3 comments

Comments

@artempankov
Copy link

artempankov commented Mar 4, 2018

handle_disconnect works perfectly for infinite reconnection like in issue 5 - when host got down after some time

but it does not handle connection error in WebSockex.start_link - so if there is no connection to host, application does not start:
21:18:29.799 [info] Application arbi exited: Arbi.Application.start(:normal, []) returned an error: shutdown: failed to start child: Arbi.WsSup ** (EXIT) shutdown: failed to start child: Arbi.WsWorker ** (EXIT) %WebSockex.ConnError{original: :econnrefused}

@Azolo
Copy link
Owner

Azolo commented Mar 4, 2018

Hi, it's actually an option for start and start_link.

Though it does need to be easier to find.

@Azolo Azolo changed the title handle_disconnect does not handle initial connect error Can't find how to trigger handle_disconnect during process initilization. Mar 4, 2018
@artempankov
Copy link
Author

thank you and sorry! may be it could be true by default, i could not imagine application that will not start because of connection timeout - it may be a temporary network glitch.

@vipul2774
Copy link

It seems it's not working. I am trying this options to handle initial connection failure but no luck. What am I doing wrong here?
[{:name, global_name()}, {:handle_initial_conn_failure, true}]

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

3 participants