Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
abijr committed Mar 4, 2024
1 parent 769c9d7 commit 67102ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/erlmld_wrk_statem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ handle_event(?INTERNAL,
%% next state is waiting for the MLD to close the connection.
%% But it might not happen, so we'll close it ourselves after a timeout.
Timeout = application:get_env(erlmld, shutdown_timeout, 5000),
{next_state, {?PEER_READ, Kind}, activate(Data), [{{timeout, shutdown}, Timeout, shutdown}]};
{next_state,
{?PEER_READ, Kind},
activate(Data),
[{{timeout, shutdown}, Timeout, shutdown}]};
_ ->
{next_state, {?PEER_READ, NextReadKind}, activate(Data)}
end;
Expand All @@ -476,7 +479,6 @@ handle_event(info, {tcp, _Socket, _Bin}, _State, _Data) ->
handle_event(info, Message, _State, #data{worker_state = WorkerState}) ->
error_logger:error_msg("~p ignoring unexpected message ~p~n", [WorkerState, Message]),
keep_state_and_data;

handle_event({timeout, shutdown}, shutdown, _State, _Data) ->
{stop, {error, shutdown_timeout}}.

Expand Down

0 comments on commit 67102ac

Please sign in to comment.