diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-10-01 17:26:07 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-10-04 18:49:18 +0200 |
commit | f1cd5d41efe0eef5d536466ee17464368b028dd2 (patch) | |
tree | 54fc43c8b1b1588eca49f854b29f06e83e6f7dd6 /util/error.c | |
parent | 56f997500aabbc1435a8cd2ea7c39d92c02755b0 (diff) |
util: WSAEWOULDBLOCK on connect should map to EINPROGRESS
In general, WSAEWOULDBLOCK can be mapped to EAGAIN as done by
socket_error() (or EWOULDBLOCK). But for connect() with non-blocking
sockets, it actually means the operation is in progress:
https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect
"The socket is marked as nonblocking and the connection cannot be completed immediately."
(this is also the behaviour implemented by GLib GSocket)
This fixes socket_can_bind_connect() test on win32.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/error.c')
0 files changed, 0 insertions, 0 deletions