DTLS.Net icon indicating copy to clipboard operation
DTLS.Net copied to clipboard

Handle synchronous return of socket.ReceiveFromAsync()

Open mfalkvidd opened this issue 5 years ago • 0 comments

If data is already pending when socket.ReceiveFromAsync() is called, the return value will be set to false. When this happens, the System.Net.Sockets.SocketAsyncEventArgs.Completed event will not be triggered, so we must call it ourselves.

If we fail to call the Completed event ourselves, the DTLS server will stop responding to any incoming data, indefinitely.

mfalkvidd avatar Apr 14 '20 07:04 mfalkvidd