Skip to content

Commit f14bd15

Browse files
rabbit_writer: ignore unknown messages
of a certain structure reported in #9803. Closes #9991.
1 parent 32ea4f1 commit f14bd15

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

deps/rabbit_common/src/rabbit_writer.erl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,14 @@ handle_message({'DOWN', _MRef, process, QPid, _Reason}, State) ->
271271
handle_message(emit_stats, State = #wstate{reader = ReaderPid}) ->
272272
ReaderPid ! ensure_stats,
273273
rabbit_event:reset_stats_timer(State, #wstate.stats_timer);
274+
handle_message(ok, State) ->
275+
State;
276+
handle_message({_Ref, ok} = Msg, State) ->
277+
rabbit_log:warning("AMQP 0-9-1 channel writer has received a message it does not support: ~p", [Msg]),
278+
State;
279+
handle_message({ok, _Ref} = Msg, State) ->
280+
rabbit_log:warning("AMQP 0-9-1 channel writer has received a message it does not support: ~p", [Msg]),
281+
State;
274282
handle_message(Message, _State) ->
275283
exit({writer, message_not_understood, Message}).
276284

0 commit comments

Comments
 (0)