diff --git a/source/NetCoreServer/TcpSession.cs b/source/NetCoreServer/TcpSession.cs index 7d01cce..71d960b 100644 --- a/source/NetCoreServer/TcpSession.cs +++ b/source/NetCoreServer/TcpSession.cs @@ -338,16 +338,16 @@ public virtual bool SendAsync(ReadOnlySpan buffer) // Update statistic BytesPending = _sendBufferMain.Size; - - // Avoid multiple send handlers - if (_sending) - return true; - else - _sending = true; - - // Try to send the main buffer - TrySend(); } + + // Avoid multiple send handlers + if (_sending) + return true; + + _sending = true; + + // Try to send the main buffer + TrySend(); return true; }