Skip to content

Commit 2175035

Browse files
committed
Handle {gen_event_EXIT,{config_listener,ioq},shutdown} message
1 parent c552c66 commit 2175035

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ioq.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ handle_info({Ref, Reply}, State) ->
7575
false ->
7676
{noreply, State, 0}
7777
end;
78-
7978
handle_info({'DOWN', Ref, _, _, Reason}, State) ->
8079
case lists:keytake(Ref, #request.ref, State#state.running) of
8180
{value, Request, Remaining} ->
@@ -84,7 +83,12 @@ handle_info({'DOWN', Ref, _, _, Reason}, State) ->
8483
false ->
8584
{noreply, State, 0}
8685
end;
87-
86+
handle_info({gen_event_EXIT, {config_listener, ?MODULE}, _Reason}, State) ->
87+
erlang:send_after(5000, self(), restart_config_listener),
88+
{noreply, State};
89+
handle_info(restart_config_listener, State) ->
90+
ok = config:listen_for_changes(?MODULE, nil),
91+
{noreply, State};
8892
handle_info(timeout, State) ->
8993
{noreply, maybe_submit_request(State)}.
9094

0 commit comments

Comments
 (0)