Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only get address from end point if safety check passed #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Only get address from end point if safety check passed
nezix authored Sep 17, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0cba7ece92cdd68d925a4788a23eba4957140f79
6 changes: 3 additions & 3 deletions MLAPI.Puncher.Server/PuncherServer.cs
Original file line number Diff line number Diff line change
@@ -96,9 +96,6 @@ private void ProcessMessage()
{
int receiveSize = Transport.ReceiveFrom(_buffer, 0, _buffer.Length, -1, out IPEndPoint senderEndpoint);

// Address
IPAddress senderAddress = senderEndpoint.Address;

if (receiveSize != _buffer.Length)
{
return;
@@ -109,6 +106,9 @@ private void ProcessMessage()
return;
}

// Address
IPAddress senderAddress = senderEndpoint.Address;

// Register client packet
byte registerFlags = _buffer[1];
bool isConnector = (registerFlags & 1) == 1;