Skip to content

Commit 5df0db1

Browse files
committed
handle ?SHUTDOWN_CHECKPOINT as well
1 parent ecb92de commit 5df0db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/erlmld_wrk_statem.erl

+2-2
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,11 @@ handle_event(?INTERNAL,
461461
end,
462462
ok = gen_tcp:send(Socket, [IoData, "\n"]),
463463
case NextReadKind of
464-
?SHUTDOWN ->
464+
Kind when Kind == ?SHUTDOWN; Kind == ?SHUTDOWN_CHECKPOINT ->
465465
%% next state is waiting for the MLD to close the connection.
466466
%% But it might not happen, so we'll close it ourselves after a timeout.
467467
%% Note that this timeout gets cancelled if we have state changes before it fires.
468-
{next_state, {?PEER_READ, ?SHUTDOWN}, activate(Data), [{state_timeout, 5000, shutdown}]};
468+
{next_state, {?PEER_READ, Kind}, activate(Data), [{state_timeout, 5000, shutdown}]};
469469
_ ->
470470
{next_state, {?PEER_READ, NextReadKind}, activate(Data)}
471471
end;

0 commit comments

Comments
 (0)