[erlang-questions] Cowboy and links: weird delayed times

Roberto Ostinelli roberto@REDACTED
Fri May 15 13:05:27 CEST 2015


Well no, since there's no guarantee that terminate/3 gets called, if you
want to use monitors you shouldn't rely on that function to cleaning them
out.

Anyway, my problem is solved by forcing the shutdown of the connection.

Best,
r.


On Fri, May 15, 2015 at 12:14 PM, Roger Lipscombe <roger@REDACTED>
wrote:

> On 15 May 2015 at 10:33, Roberto Ostinelli <roberto@REDACTED> wrote:
> > Answering my own here.
> > This is pretty simple actually: if the connection header of the clients
> is
> > keep-alive, Cowboy will wait the timeout before killing the process, so
> > obviously it isn't removed from the router.
>
> Yes, per
> http://ninenines.eu/docs/en/cowboy/1.0/guide/http_handlers/#cleaning_up:
>
> "If you used the process dictionary, timers, monitors or may be
> receiving messages, then you can use this function to clean them up,
> as Cowboy might reuse the process for the next keep-alive request."
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150515/7e5a6d14/attachment.htm>


More information about the erlang-questions mailing list