Add missing demonitor() calls #11

Merged
uwiger merged 4 commits from uw-demonitor into master 2025-08-27 19:28:50 +09:00
Showing only changes of commit 36a11575d2 - Show all commits

View File

@ -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.