[erlang-questions] What is the right way to update cowboy dispatch rules on-fly?
Loïc Hoguin
essen@REDACTED
Mon Sep 3 20:46:33 CEST 2012
On 09/03/2012 08:45 PM, Max Lapshin wrote:
> On Mon, Sep 3, 2012 at 10:42 PM, Loïc Hoguin <essen@REDACTED> wrote:
>> On 09/03/2012 08:41 PM, Max Lapshin wrote:
>>>
>>> cowboy:set_protocol_options doesn't change dispatch rules.
>>
>>
>> It changes protocol options which includes dispatch rules?
>>
>
> I put io:format in cowboy_dispatcher on line 104:
>
> match(_Host, Path, [{'_', PathMatchs}|_Tail]) ->
> match_path(Path, PathMatchs, [], undefined);
>
> and see, that PathMatchs and cowboy:get_protocol_options differs.
>
> Looks like new protocol options are passed only to new workers, while
> old live with old rules.
Yep.
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the erlang-questions
mailing list