Merge pull request #14123 from rabbitmq/rabbitmq-server-14121
By @tomyouyou: Avoid a scary log exception when a closing connection runs into an exception during a command writer flush operation
This commit is contained in:
commit
7ec370347c
|
@ -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:debug("Failed to flush pending writes on a terminating connection, reason: ~tp", [Reason])
|
||||
end,
|
||||
{stop, normal, State};
|
||||
|
||||
handle_cast({command, #'basic.consume_ok'{consumer_tag = CTag} = Msg},
|
||||
|
|
Loading…
Reference in New Issue