Skip to content

Commit

Permalink
Fix buffer size error (fix #135)
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Jan 14, 2018
1 parent cdc8315 commit 2d0defb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LiteNetLib/NetSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ public int SendTo(byte[] data, int offset, int size, NetEndPoint remoteEndPoint,
}
catch (SocketException ex)
{
if (ex.SocketErrorCode == SocketError.Interrupted)
if (ex.SocketErrorCode == SocketError.Interrupted ||
ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable)
{
return 0;
}
Expand Down

0 comments on commit 2d0defb

Please sign in to comment.