Skip to content

Commit

Permalink
Issue #2804 - communication exceptions not recycling the receive tran…
Browse files Browse the repository at this point in the history
…sport, isTransient isn't really "correct" in this case.
  • Loading branch information
phatboyg committed Oct 11, 2021
1 parent cfbfc59 commit b13ab48
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -53,17 +53,18 @@ protected async Task ExceptionHandler(ExceptionReceivedEventArgs args)
{
MessageLockLostException _ => false,
MessageTimeToLiveExpiredException _ => false,
ServiceBusException {IsTransient: true} => false,
ServiceBusCommunicationException _ => true,
ServiceBusException { IsTransient: true } => false,
_ => true
};

if (args.Exception is ServiceBusCommunicationException {IsTransient: true})
if (args.Exception is ServiceBusCommunicationException { IsTransient: true })
{
LogContext.Debug?.Log(args.Exception,
"Exception on Receiver {InputAddress} during {Action} ActiveDispatchCount({activeDispatch}) ErrorRequiresRecycle({requiresRecycle})",
_context.InputAddress, args.ExceptionReceivedContext.Action, _messageReceiver.ActiveDispatchCount, requiresRecycle);
}
else if (args.Exception is ObjectDisposedException {ObjectName: "$cbs"})
else if (args.Exception is ObjectDisposedException { ObjectName: "$cbs" })
{
// don't log this one
}
Expand Down

0 comments on commit b13ab48

Please sign in to comment.