Add a `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.
(cherry picked from commit 0ce6ad0f0f)
This commit is contained in:
parent
d9ec0b35ad
commit
f21a32d822
|
|
@ -384,6 +384,10 @@ init([Driver, Connection, ChannelNumber, Consumer, Identity]) ->
|
|||
handle_call(open, From, State) ->
|
||||
{noreply, rpc_top_half(#'channel.open'{}, none, From, none, noflow, State)};
|
||||
%% @private
|
||||
handle_call(flush, _From, State) ->
|
||||
flush_writer(State),
|
||||
{noreply, State};
|
||||
%% @private
|
||||
handle_call({close, Code, Text}, From, State) ->
|
||||
handle_close(Code, Text, From, State);
|
||||
%% @private
|
||||
|
|
|
|||
Loading…
Reference in New Issue