From 36a11575d2a7681acf866c8410e2d20a9d9b1e23 Mon Sep 17 00:00:00 2001 From: Ulf Wiger Date: Wed, 20 Aug 2025 20:43:17 +0200 Subject: [PATCH] Add missing demonitor() calls --- src/gmhc_handler.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gmhc_handler.erl b/src/gmhc_handler.erl index 9a58c75..f46761d 100644 --- a/src/gmhc_handler.erl +++ b/src/gmhc_handler.erl @@ -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.