[erlang-questions] [ANN] Ranch 0.6.0 Xmas Edition Released
Loïc Hoguin
essen@REDACTED
Wed Jan 23 14:37:43 CET 2013
On 01/23/2013 02:29 PM, Max Lapshin wrote:
> Currently I have to do following thing to really update routes:
>
> case lists:keyfind({ranch_listener_sup,my_http}, 1,
> supervisor:which_children(ranch_sup)) of
> {_, ListenerSup, _, _} ->
> case lists:keyfind(ranch_acceptors_sup, 1,
> supervisor:which_children(ListenerSup)) of
> {_, AcceptorSup, _, _} ->
> [erlang:exit(Pid,normal) || {_,Pid,_,_} <-
> supervisor:which_children(AcceptorSup)],
> ok;
> false ->
> ok
> end;
> false -> ok
> end
>
> because after ranch:set_protocol_options(Ref, ProtoOpts) there are
> still acceptors that work with old routing information
>
>
> cowboy d3277b08ce
> ranch c3133bfbc3
>
> Should I just update?
The version you're using has all acceptors updated immediately. There's
a test for it (tcp_upgrade) that confirms it properly upgrades. Are you
sure it's *acceptors* that are using the old routing information and not
*connections*? Only new connections get the new protocol options.
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the erlang-questions
mailing list