Skip to content

Commit 7c73c46

Browse files
committed
Add a no-op flush handler to amqp_channel
rabbit_channel may use amqp_channel as the writer. When terminating, rabbit_channel sends a `flush` message to its writer. If amqp_channel is in use, that led to a `function_clause` crash.
1 parent 0ec41c6 commit 7c73c46

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deps/amqp_client/src/amqp_channel.erl

+3
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ init([Driver, Connection, ChannelNumber, Consumer, Identity]) ->
384384
handle_call(open, From, State) ->
385385
{noreply, rpc_top_half(#'channel.open'{}, none, From, none, noflow, State)};
386386
%% @private
387+
handle_call(flush, _From, State) ->
388+
{noreply, State};
389+
%% @private
387390
handle_call({close, Code, Text}, From, State) ->
388391
handle_close(Code, Text, From, State);
389392
%% @private

0 commit comments

Comments
 (0)