Skip to content

Commit

Permalink
Fix unnecessary error log on dispose (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk authored Jan 24, 2024
1 parent 470e9df commit ba2b689
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NATS.Client.Core/NatsConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,10 @@ private async Task PublishEventsAsync()
}
}
}
catch (OperationCanceledException)
{
// Ignore, we're disposing the connection
}
catch (Exception ex)
{
_logger.LogError(NatsLogEvents.Connection, ex, "Error occured when publishing events");
Expand Down

0 comments on commit ba2b689

Please sign in to comment.