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

when another side exited, implementations should handle it #25

Open
DavidAlphaFox opened this issue Jan 16, 2018 · 0 comments
Open

when another side exited, implementations should handle it #25

DavidAlphaFox opened this issue Jan 16, 2018 · 0 comments

Comments

@DavidAlphaFox
Copy link
Contributor

DavidAlphaFox commented Jan 16, 2018

In server mode chumak_socket should not exit when a peer shutdown except pair mode.
I think this should be handled in implementation of each patterns, every implementation should decide exit or not.
So the implementations should add another argument in peer_disconected to handle the reason of exit.
But I found a lot of shutdown tuples in chumak_peer and the code of below in chumak_socket

 handle_info({'EXIT', PeerPid, {shutdown, _Reason}}, State) ->
    exit_peer(PeerPid, State),
   {stop, normal, State};

My question is that there is any intended to use shutdown as a special operation to stop chumak_socket ?

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

2 participants