Skip to content

Commit 5a873e4

Browse files
author
Pierre Setteskog
committed
abort autorecovery if topology cant be recovered because of connection problem
1 parent 84ec099 commit 5a873e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

projects/RabbitMQ.Client/client/impl/AutorecoveringConnection.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,12 @@ private void EnsureIsOpen()
896896
private void HandleTopologyRecoveryException(TopologyRecoveryException e)
897897
{
898898
ESLog.Error("Topology recovery exception", e);
899-
throw e;
899+
if (e.InnerException is AlreadyClosedException || e.InnerException is OperationInterruptedException || e.InnerException is TimeoutException)
900+
{
901+
throw e;
902+
}
903+
ESLog.Error($"Will not throw Topology Exception {e.InnerException?.GetType().FullName}.", e);
904+
900905
}
901906

902907
private void PropagateQueueNameChangeToBindings(string oldName, string newName)

0 commit comments

Comments
 (0)