Skip to content

Commit

Permalink
Patch dos bug / vuln (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
megalithos authored Jan 7, 2025
1 parent 10f4db9 commit ffd0fec
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ private void Receive()
isRunning = false;
break;
case SocketError.ConnectionReset:
tryReceiveMore = true;
break;
case SocketError.MessageSize:
case SocketError.TimedOut:
break;
Expand Down Expand Up @@ -160,7 +162,7 @@ internal void Send(byte[] dataBuffer, int numBytes, IPEndPoint toEndPoint)
if (isRunning)
socket.SendTo(dataBuffer, numBytes, SocketFlags.None, toEndPoint);
}
catch(SocketException)
catch (SocketException)
{
// May want to consider triggering a disconnect here (perhaps depending on the type
// of SocketException)? Timeout should catch disconnections, but disconnecting
Expand Down

0 comments on commit ffd0fec

Please sign in to comment.