Skip to content

Commit 5421696

Browse files
committed
Don't swallow exceptions unless abort is specified.
1 parent 19cc98b commit 5421696

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -374,17 +374,7 @@ await _session0.TransmitAsync(method, cancellationToken)
374374
await _mainLoopTask.WaitAsync(timeout, cancellationToken)
375375
.ConfigureAwait(false);
376376
}
377-
catch (AggregateException)
378-
{
379-
}
380-
// TODO timeout vs real cancellation?
381-
catch (OperationCanceledException)
382-
{
383-
}
384-
catch (TimeoutException)
385-
{
386-
}
387-
finally
377+
catch
388378
{
389379
try
390380
{
@@ -395,6 +385,11 @@ await _frameHandler.CloseAsync()
395385
catch
396386
{
397387
}
388+
389+
if (false == abort)
390+
{
391+
throw;
392+
}
398393
}
399394
}
400395

0 commit comments

Comments
 (0)