Skip to content

Fix incorrect control buffer length when filling WSAMSG for WSARecvMsg #379

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ManManson
Copy link

Somehow, this bug causes problems with listen sockets on Windows 11 platform.

After some number of client connections being abruptly terminated (e.g. client has crashed), the host just stops to invoke connection state change callbacks for the still opened listen socket.

In this particular case, WSARecvMsg always returns -1 (SOCKET_ERROR) and WSAGetLastError() returns 10014 (WSAEFAULT), which indicates there's a problem with function arguments.

So, it seems, that in some cases Windows will try to use the control data, but if there's been some problem with it, the connection will just remain in the broken state forever.

…vMsg`

Somehow, this bug causes problems with listen sockets on Windows 11
platform.

After some number of client connections being abruptly terminated
(e.g. client has crashed), the host just stops to invoke connection
state change callbacks for the still opened listen socket.

In this particular case, `WSARecvMsg` always returns -1 (SOCKET_ERROR)
and `WSAGetLastError()` returns 10014 (WSAEFAULT), which indicates
there's a problem with function arguments.

So, it seems, that in some cases Windows will try to use the control
data, but if there's been some problem with it, the connection will
just remain in the broken state forever.

Signed-off-by: Pavel Solodovnikov <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant