Skip to content

Commit 3616e98

Browse files
authored
When it is NotActive no need to log error (#1631)
1 parent c87f2da commit 3616e98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Microsoft.Azure.SignalR/ServerConnections/ServiceConnection.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Threading.Tasks;
1010
using Microsoft.AspNetCore.Connections;
1111
using Microsoft.AspNetCore.Http;
12+
using Microsoft.Azure.SignalR.Common;
1213
using Microsoft.Azure.SignalR.Protocol;
1314
using Microsoft.Extensions.Logging;
1415
using Microsoft.Extensions.Primitives;
@@ -337,6 +338,11 @@ private async Task ProcessOutgoingMessagesAsync(ClientConnectionContext connecti
337338
// Forward the message to the service
338339
await WriteAsync(new ConnectionDataMessage(connection.ConnectionId, buffer));
339340
}
341+
catch (ServiceConnectionNotActiveException)
342+
{
343+
// Service connection not active means the transport layer for this connection is closed, no need to continue processing
344+
break;
345+
}
340346
catch (Exception ex)
341347
{
342348
Log.ErrorSendingMessage(Logger, ex);

0 commit comments

Comments
 (0)