-
Notifications
You must be signed in to change notification settings - Fork 49
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
Check if killing the socket process actually closes the socket #18
Comments
Hi so I have done some test. Here is a Python router socket that just pings pack whatever it gets. Anaconda python distribution contains all the dependencies.
Here is an Elixir module with function quote_handler that starts up a new Chumak socket, sends stuff over, and prints back the response.
You'll need this under deps in your mix.exs file at the root directory of the project:
Now I will demonstrate that chumak does not clean up its processes giving an "already started" error.
Here are the screenshots from :observer to show that chumak processes are not dying. They're sitting there and don't get killed even though the spawned process that launched them is no longer alive. |
Oh I saw that the sock variable is actually a process ID. So I tried to kill those explicitly using Process.exit(sock, :kill) but because these are supervised by chumak_sup, it seems they're always restarted. So I don't know, basically, how to close the socket. |
Woah! Thanks for the great report. |
If you've got time @vegabook, please look this over. I'm going to close it for now, feel free to re-open! |
I also noticed this, a simple Since, the Socket is a |
It is not clear to me whether this trap exit:
https://github.com/zeromq/chumak/blob/master/src/chumak_socket.erl#L34
shuts down the socket (and not only the peer):
https://github.com/zeromq/chumak/blob/master/src/chumak_socket.erl#L109
The text was updated successfully, but these errors were encountered: