Просмотр исходного кода

Catch exceptions in ranch_conns_sup:active_connections/1

It can be called from other nodes too.
Loïc Hoguin 12 лет назад
Родитель
Сommit
033afb1a44
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/ranch_conns_sup.erl

+ 1 - 1
src/ranch_conns_sup.erl

@@ -75,7 +75,7 @@ start_protocol(SupPid, Socket) ->
 -spec active_connections(pid()) -> non_neg_integer().
 active_connections(SupPid) ->
 	Tag = erlang:monitor(process, SupPid),
-	erlang:send(SupPid, {?MODULE, active_connections, self(), Tag},
+	catch erlang:send(SupPid, {?MODULE, active_connections, self(), Tag},
 		[noconnect]),
 	receive
 		{Tag, Ret} ->