Add missing demonitor() calls
This commit is contained in:
parent
5bc0fc5ff8
commit
36a11575d2
@ -129,12 +129,15 @@ call_connector(Req0) ->
|
||||
gmhc_connector:send(ViaId, #{call => Req#{ id => Id }}),
|
||||
receive
|
||||
{from_pool, #{reply := #{ id := Id, result := Result }}} ->
|
||||
erlang:demonitor(MRef),
|
||||
Result;
|
||||
{from_pool, #{error := #{ id := Id } = Error}} ->
|
||||
erlang:demonitor(MRef),
|
||||
{error, maps:remove(id, Error)};
|
||||
{'DOWN', MRef, _, _, _} ->
|
||||
{error, no_connection}
|
||||
after 5000 ->
|
||||
erlang:demonitor(MRef),
|
||||
{error, {timeout, process_info(self(), messages)}}
|
||||
end
|
||||
end.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user