[erlang-questions] Cowboy and links: weird delayed times
Fri May 15 13:57:31 CEST 2015
It's there to handle the case where you have keep-alive and have two
unrelated requests one after another, not the case where the process ends.
Force closing in your case is the right solution.
On 05/15/2015 02:05 PM, Roberto Ostinelli wrote:
> 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.
> On Fri, May 15, 2015 at 12:14 PM, Roger Lipscombe
> < <mailto:>> wrote:
> On 15 May 2015 at 10:33, Roberto Ostinelli <
> <mailto:>> 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
> "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."
> erlang-questions mailing list
More information about the erlang-questions