gen_server can't trap 'EXIT' from parent
Fredrik Thulin
ft@REDACTED
Tue Jan 11 10:29:03 CET 2005
On Monday 10 January 2005 22.24, Vlad Dumitrescu wrote:
> --- Original Message -----
> From: "Fredrik Thulin" <ft@REDACTED>
>
> > Right! That explains it. If the 'EXIT' comes from your gen_servers
> > parent (almost always your supervisor I guess) then you can't trap
> > it!
>
> Hi,
>
> Your gen_server gets notified that the parent creshed: terminate is
> called. You can do whatever you need to do there, instead of inside
> handle_info. It's just the same, since the gen_server should probably
> exit too.
No it shouldn't. My gen_server should send a SIP error message back, and
then stay alive for (most oftenly) 32 seconds to make sure that we
re-send this SIP error message if we get a resend of the original SIP
request (not my idea to run SIP over unreliable transports...).
/Fredrik
More information about the erlang-questions
mailing list