File tree Expand file tree Collapse file tree 2 files changed +23
-13
lines changed
src/WebJobs.Script.Grpc/Server Expand file tree Collapse file tree 2 files changed +23
-13
lines changed Original file line number Diff line number Diff line change 1
- ### Release notes
2
-
3
- <!-- Please add your release notes in the following format:
4
- - My change description (#PR)
5
- -->
6
- - Adding activity sources for Durable and WebJobs (Kafka and RabbitMQ) (#11137 )
7
- - Add JitTrace Files for v4.1041
8
- - Fix startup deadlock on transient exceptions (#11142 )
9
- - Add warning log for end of support bundle version, any bundle version < 4 (#11075 ), (#11160 )
10
- - Handles loading extensions.json with empty extensions(#11174 )
11
- - Update HttpWorkerOptions to implement IOptionsFormatter (#11175 )
12
- - Improved metadata binding validation (#11101 )
1
+ ### Release notes
2
+
3
+ <!-- Please add your release notes in the following format:
4
+ - My change description (#PR)
5
+ -->
6
+ - Adding activity sources for Durable and WebJobs (Kafka and RabbitMQ) (#11137 )
7
+ - Add JitTrace Files for v4.1041
8
+ - Fix startup deadlock on transient exceptions (#11142 )
9
+ - Add warning log for end of support bundle version, any bundle version < 4 (#11075 ), (#11160 )
10
+ - Handles loading extensions.json with empty extensions(#11174 )
11
+ - Update HttpWorkerOptions to implement IOptionsFormatter (#11175 )
12
+ - Improved metadata binding validation (#11101 )
13
+ - Skip logging errors on gRPC client disconnect (#10572 )
Original file line number Diff line number Diff line change 2
2
// Licensed under the MIT License. See License.txt in the project root for license information.
3
3
4
4
using System ;
5
+ using System . IO ;
5
6
using System . Reactive . Linq ;
6
7
using System . Threading ;
7
8
using System . Threading . Channels ;
8
9
using System . Threading . Tasks ;
9
10
using Grpc . Core ;
11
+ using Microsoft . AspNetCore . Connections ;
10
12
using Microsoft . Azure . WebJobs . Script . Eventing ;
11
13
using Microsoft . Azure . WebJobs . Script . Grpc . Eventing ;
12
14
using Microsoft . Azure . WebJobs . Script . Grpc . Messages ;
13
15
using Microsoft . Extensions . Logging ;
14
-
15
16
using MsgType = Microsoft . Azure . WebJobs . Script . Grpc . Messages . StreamingMessage . ContentOneofCase ;
16
17
17
18
namespace Microsoft . Azure . WebJobs . Script . Grpc
@@ -75,6 +76,14 @@ static Task<Task<bool>> MoveNextAsync(IAsyncStreamReader<StreamingMessage> reque
75
76
}
76
77
}
77
78
}
79
+ catch ( IOException ex ) when ( ex . InnerException is ConnectionAbortedException && context . CancellationToken . IsCancellationRequested )
80
+ {
81
+ // Expected when the client disconnects.
82
+ // Client side stream termination (e.g., process exit or network interruption)
83
+ // can cause MoveNext() to throw an IOException with a ConnectionAbortedException as the inner exception.
84
+ // If ServerCallContext's cancellation token is also canceled at this point, the exception can be safely ignored.
85
+ return ;
86
+ }
78
87
catch ( Exception rpcException )
79
88
{
80
89
// We catch the exception, just to report it, then re-throw it
You can’t perform that action at this time.
0 commit comments