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

NullReferenceException in UdpTransport ReceiveFromCallback method #25

Open
dimochka opened this issue Sep 11, 2024 · 0 comments
Open

NullReferenceException in UdpTransport ReceiveFromCallback method #25

dimochka opened this issue Sep 11, 2024 · 0 comments

Comments

@dimochka
Copy link

Checking for _socket is null and using _socket after this.
if( _socket == null )
_asyncCallback(AsyncRequestResult.Terminated, new IPEndPoint(_socket.AddressFamily == AddressFamily.InterNetwork ? IPAddress.Any : IPAddress.IPv6Any, 0), null, 0);
else
_asyncCallback(AsyncRequestResult.Terminated, new IPEndPoint(IPAddress.Any, 0), null, 0);
return; // socket has been closed. no new operations are possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant