[erlang-questions] gen_server not unregistering [20.1]

Heinrich Venter hfventer@REDACTED
Wed Mar 7 13:48:27 CET 2018


Hi all

I have been experiencing the strangest thing.

I am using an application (gen_rpc) that internally uses a gen_server to
manage a gen_tcp outgoing socket.

On closing of the socket form the server side, the message {tcp_closed,
Socket} is received in the handle_info. This handle_info returns {stop,
normal, State}
BUT
The gen_server does not actually terminate. It does not call terminate and
the PID remains registered locally. It actually keeps on processing
messages which leads to badtcp reponses when it tires to send on the failed
socket.

Has any one seen something remotely like this, or have any suggestions of
how to proceed?

Links
https://github.com/priestjim/gen_rpc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180307/b83b1370/attachment.htm>


More information about the erlang-questions mailing list