[erlang-questions] Cowboy and links: weird delayed times
Loïc Hoguin
essen@REDACTED
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.
>
> Best,
> r.
>
>
> On Fri, May 15, 2015 at 12:14 PM, Roger Lipscombe
> <roger@REDACTED <mailto:roger@REDACTED>> wrote:
>
> On 15 May 2015 at 10:33, Roberto Ostinelli <roberto@REDACTED
> <mailto: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."
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
--
Loïc Hoguin
http://ninenines.eu
More information about the erlang-questions
mailing list