File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 4
4
using System . IO ;
5
5
using System . IO . Pipelines ;
6
6
using System . Linq ;
7
+ using System . Net . Sockets ;
7
8
using System . Reactive ;
8
9
using System . Reactive . Concurrency ;
9
10
using System . Reactive . Disposables ;
@@ -145,16 +146,13 @@ public void Start()
145
146
await ProcessInputStream ( _stopProcessing . Token ) . ConfigureAwait ( false ) ;
146
147
}
147
148
catch ( IOException e )
149
+ when ( e . InnerException is SocketException { SocketErrorCode : SocketError . ConnectionReset } )
148
150
{
149
- if ( e . InnerException is SocketException se && se . SocketErrorCode == SocketError . ConnectionReset )
150
- _logger . LogInformation ( e , "Connection reset by client." ) ;
151
- else
152
- throw ;
153
-
151
+ _logger . LogInformation ( e , "Connection reset by client." ) ;
154
152
}
155
153
catch ( Exception e )
156
154
{
157
- _logger . LogCritical ( e , "Unhandled exception" ) ;
155
+ _logger . LogCritical ( e , "Unhandled exception. " ) ;
158
156
}
159
157
}
160
158
) . Subscribe ( _inputActive )
You can’t perform that action at this time.
0 commit comments