[erlang-questions] What is the right way to update cowboy dispatch rules on-fly?
Max Lapshin
max.lapshin@REDACTED
Mon Sep 3 20:45:31 CEST 2012
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.
More information about the erlang-questions
mailing list