File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/MySqlConnector/Protocol/Serialization Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . IO ;
3+ using System . Net . Sockets ;
34using System . Threading ;
45using System . Threading . Tasks ;
56using MySql . Data . MySqlClient ;
@@ -38,7 +39,7 @@ ValueTask<int> DoReadBytesSync(ArraySegment<byte> buffer_)
3839 }
3940 catch ( Exception ex )
4041 {
41- if ( ex is IOException && RemainingTimeout != Constants . InfiniteTimeout )
42+ if ( RemainingTimeout != Constants . InfiniteTimeout && ex is IOException ioException && ioException . InnerException is SocketException socketException && socketException . SocketErrorCode == SocketError . TimedOut )
4243 return ValueTaskExtensions . FromException < int > ( MySqlException . CreateForTimeout ( ex ) ) ;
4344 return ValueTaskExtensions . FromException < int > ( ex ) ;
4445 }
You can’t perform that action at this time.
0 commit comments