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 44using System . IO ;
55using System . IO . Pipelines ;
66using System . Linq ;
7+ using System . Net . Sockets ;
78using System . Reactive ;
89using System . Reactive . Concurrency ;
910using System . Reactive . Disposables ;
@@ -145,16 +146,13 @@ public void Start()
145146 await ProcessInputStream ( _stopProcessing . Token ) . ConfigureAwait ( false ) ;
146147 }
147148 catch ( IOException e )
149+ when ( e . InnerException is SocketException { SocketErrorCode : SocketError . ConnectionReset } )
148150 {
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." ) ;
154152 }
155153 catch ( Exception e )
156154 {
157- _logger . LogCritical ( e , "Unhandled exception" ) ;
155+ _logger . LogCritical ( e , "Unhandled exception. " ) ;
158156 }
159157 }
160158 ) . Subscribe ( _inputActive )
You can’t perform that action at this time.
0 commit comments