File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/MySqlConnector/Protocol/Serialization Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ ValueTask<int> DoReadBytesSync(ArraySegment<byte> buffer_)
5555 async Task < int > DoReadBytesAsync ( ArraySegment < byte > buffer_ )
5656 {
5757 var startTime = RemainingTimeout == Constants . InfiniteTimeout ? 0 : Environment . TickCount ;
58- var timerId = RemainingTimeout == Constants . InfiniteTimeout ? 0 : TimerQueue . Instance . Add ( RemainingTimeout , m_closeSocket ) ;
58+ var timerId = RemainingTimeout == Constants . InfiniteTimeout ? 0 :
59+ RemainingTimeout <= 0 ? throw MySqlException . CreateForTimeout ( ) :
60+ TimerQueue . Instance . Add ( RemainingTimeout , m_closeSocket ) ;
5961 m_socketAwaitable . EventArgs . SetBuffer ( buffer_ . Array , buffer_ . Offset , buffer_ . Count ) ;
6062 int bytesRead ;
6163 try
You can’t perform that action at this time.
0 commit comments