<div dir="ltr">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.<div><br></div><div>Anyway, my problem is solved by forcing the shutdown of the connection.</div><div><br></div><div>Best,</div><div>r.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 12:14 PM, Roger Lipscombe <span dir="ltr"><<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 15 May 2015 at 10:33, Roberto Ostinelli <<a href="mailto:roberto@widetag.com">roberto@widetag.com</a>> wrote:<br>
> Answering my own here.<br>
> This is pretty simple actually: if the connection header of the clients is<br>
> keep-alive, Cowboy will wait the timeout before killing the process, so<br>
> obviously it isn't removed from the router.<br>
<br>
</span>Yes, per <a href="http://ninenines.eu/docs/en/cowboy/1.0/guide/http_handlers/#cleaning_up" target="_blank">http://ninenines.eu/docs/en/cowboy/1.0/guide/http_handlers/#cleaning_up</a>:<br>
<br>
"If you used the process dictionary, timers, monitors or may be<br>
receiving messages, then you can use this function to clean them up,<br>
as Cowboy might reuse the process for the next keep-alive request."<br>
</blockquote></div><br></div>