Skip to content

Commit 268b15b

Browse files
mkuratczykmergify[bot]
authored andcommitted
Ignore stream connections in unexpected states
A connection which terminated before it was fully established would lead to a function_clause, since metadata is not available to really call notify_connection_closed. We can just ignore such connections and not notify about them. Resolves https://github.com/rabbitmq/rabbitmq-server/discussions/13670 (cherry picked from commit 09ed8fd)
1 parent fc74118 commit 268b15b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

+3-1
Original file line numberDiff line numberDiff line change
@@ -3221,7 +3221,9 @@ notify_connection_closed(#statem_data{
32213221
{client_properties, ClientProperties}],
32223222
rabbit_event:notify(connection_closed,
32233223
augment_infos_with_user_provided_connection_name(EventProperties,
3224-
Connection)).
3224+
Connection));
3225+
notify_connection_closed(#statem_data{}) ->
3226+
ok.
32253227

32263228
handle_frame_post_close(_Transport,
32273229
Connection,

0 commit comments

Comments
 (0)