[erlang-questions] What is the right way to update cowboy dispatch rules on-fly?

Loïc Hoguin <>
Mon Sep 3 21:47:28 CEST 2012


On 09/03/2012 09:46 PM, Max Lapshin wrote:
> I'm trying to update routes.
>
> I call cowboy:set_protocol_options with new dispatch rules.
> After this I reload page in web browser (firefox) and see in logs that
> some process is still using old dispatch map.
>
> It looks, like cowboy_acceptor is starting child in acceptor/7 with old options.

In the current Cowboy code, the next request is using the old options. 
It's only the one after that that uses the new options.

In the upcoming code the change is instantaneous.

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



More information about the erlang-questions mailing list