Skip to content

Commit

Permalink
Merge pull request #3772 from esl/websocket
Browse files Browse the repository at this point in the history
Fix mod_websockets_SUITE

The supervisor tree was changed in newer version of ranch. This commit fixes the issue with getting a list of ranch connections.
  • Loading branch information
NelsonVides authored Sep 23, 2022
2 parents 6a2100c + f64f35e commit 1023aa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/mod_websockets_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ get_child_by_mod(Sup, Mod) ->

get_ranch_connections() ->
LSup = get_child_by_mod(ranch_sup, ranch_listener_sup),
CSup = get_child_by_mod(LSup, ranch_conns_sup),
[ {Mod, Pid} || {_, Pid, _, [Mod]} <- supervisor:which_children(CSup) ].
CSup = get_child_by_mod(LSup, ranch_conns_sup_sup),
[{Mod, Pid} || {_, Sup, _, [ranch_conns_sup]} <- supervisor:which_children(CSup),
{_, Pid, _, [Mod]} <- supervisor:which_children(Sup)].

wait_for_no_ranch_connections(Times) ->
case get_ranch_connections() of
Expand Down

0 comments on commit 1023aa7

Please sign in to comment.