summaryrefslogtreecommitdiff
path: root/deps/rabbit/src/rabbit_channel.erl
diff options
context:
space:
mode:
Diffstat (limited to 'deps/rabbit/src/rabbit_channel.erl')
-rw-r--r--deps/rabbit/src/rabbit_channel.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/rabbit/src/rabbit_channel.erl b/deps/rabbit/src/rabbit_channel.erl
index 869610f9ae..78f34b88df 100644
--- a/deps/rabbit/src/rabbit_channel.erl
+++ b/deps/rabbit/src/rabbit_channel.erl
@@ -2175,6 +2175,16 @@ deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{ex
ok
end,
State;
+ %% When sending to QQs we may get an error when the process shuts
+ %% down or gets killed. In that case we retry. We can retry safely
+ %% because we are sending to a single queue in this function clause.
+ %%
+ %% We do not need to worry about infinite loops because this
+ %% is only sent when the process exits.
+ {error, {shutdown, _}} ->
+ deliver_to_queues({Delivery, [QName]}, State0);
+ {error, {killed, _}} ->
+ deliver_to_queues({Delivery, [QName]}, State0);
{error, {stream_not_found, Resource}} ->
rabbit_misc:protocol_error(
resource_error,