Skip to content

Commit 9908b25

Browse files
committed
amqp10_client: Accept the {shutdown, _} exit reason is close_sent/3
[Why] The clause above the new one in `close_sent/3` was already handling the fact that the remote process could exit during the close "handshake". But the remote process could terminate with `{shutdown, Reason}` in addition to `shutdown`, where `Reason` is `delete` or `autodelete` for instance. [How] We handle `{shutdown, _}` exactly as `shutdown`. This was detected by frequent failures in CI.
1 parent 0c4ec95 commit 9908b25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deps/amqp10_client/src/amqp10_client_connection.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ close_sent(_EvtType, heartbeat, _Data) ->
352352
close_sent(_EvtType, {'EXIT', _Pid, shutdown}, _Data) ->
353353
%% monitored processes may exit during closure
354354
keep_state_and_data;
355+
close_sent(_EvtType, {'EXIT', _Pid, {shutdown, _}}, _Data) ->
356+
%% monitored processes may exit during closure
357+
keep_state_and_data;
355358
close_sent(_EvtType, {'DOWN', _Ref, process, ReaderPid, _Reason},
356359
#state{reader = ReaderPid}) ->
357360
%% if the reader exits we probably won't receive a close frame

0 commit comments

Comments
 (0)