[99s-extend] handler and a linked process

Loïc Hoguin essen at ninenines.eu
Mon Oct 21 15:07:34 CEST 2013


Hey,

I'm guessing you use loop handler or websocket handler? The browser 
closing the connection in these cases is perfectly normal, that's part 
of the deal. What you can do is monitor the connection process from the 
other process if you need to go down in all cases. Links are only useful 
for crashing on errors.

On 10/18/2013 03:15 PM, akonsu wrote:
> Hi,
>
> I have a handler that spawns a process and links to this process. the
> new process does not trap exit signals.
>
> When I open the URL that is handled by this handler in the browser, and
> stop the browser before the handler finishes the request, the handler is
> terminated and my terminate function is called with the Reason set to
> {error,closed} or something similar.
>
> When this happens, the linked process does not get killed, so I have to
> call exit on it from the terminate function.
>
> is this by design? I suppose when I cancel the browser request, the
> handler is exited with normal exit code, correct? could you point me to
> the source code for that part? it is perhaps in the "ranch" repo, no?
>
> thanks in advance
>
> konstantin
>
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> http://lists.ninenines.eu:81/listinfo/extend
>


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the Extend mailing list