amqp_channel: Ignore all exceptions from `rabbit_writer:flush/1`
[Why]
The writer process could still be exiting at the time flush is called.
For instance, the reason could be `{shutdown, _}`.
Also, with the conversion of the `rabbit_writer` to a gen_server, the
noproc reason would be `{noproc, _}`.
[How]
`flush_writer/1` is called in the channel `terminate/2` function, so we
don't really care about any writer errors at this point. Let's ignore
any exceptions.
This commit is contained in:
parent
eff64a2d96
commit
8093930445
|
|
@ -876,11 +876,8 @@ do(Method, Content, Flow, #state{driver = direct, writer = W}) ->
|
|||
|
||||
|
||||
flush_writer(#state{driver = network, writer = Writer}) ->
|
||||
try
|
||||
rabbit_writer:flush(Writer)
|
||||
catch
|
||||
exit:noproc -> ok
|
||||
end;
|
||||
_ = catch rabbit_writer:flush(Writer),
|
||||
ok;
|
||||
flush_writer(#state{driver = direct}) ->
|
||||
ok.
|
||||
amqp_msg(none) ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue