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_)
55
55
async Task < int > DoReadBytesAsync ( ArraySegment < byte > buffer_ )
56
56
{
57
57
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 ) ;
59
61
m_socketAwaitable . EventArgs . SetBuffer ( buffer_ . Array , buffer_ . Offset , buffer_ . Count ) ;
60
62
int bytesRead ;
61
63
try
You can’t perform that action at this time.
0 commit comments