diff --git a/deps/rabbit/src/rabbit_channel.erl b/deps/rabbit/src/rabbit_channel.erl index ed5b58845a59..423cc2f4d92e 100644 --- a/deps/rabbit/src/rabbit_channel.erl +++ b/deps/rabbit/src/rabbit_channel.erl @@ -639,7 +639,12 @@ handle_cast(ready_for_close, {stop, normal, State}; handle_cast(terminate, State = #ch{cfg = #conf{writer_pid = WriterPid}}) -> - ok = rabbit_writer:flush(WriterPid), + try + ok = rabbit_writer:flush(WriterPid) + catch + Class:Reason -> + rabbit_log:info("Failed to flushing writer ~tp, Error:~tp", [WriterPid, {Class,Reason}]) + end, {stop, normal, State}; handle_cast({command, #'basic.consume_ok'{consumer_tag = CTag} = Msg},