Hi,
g_socket_send_message_with_timeout() returns G_POLLABLE_RETURN_WOULD_BLOCK on Windows as it receives WSAEWOULDBLOCK and if we are not blocking on timeout. So, we ought to set the same error code as well when we receive G_POLLABLE_RETURN_WOULD_BLOCK when calling socket_set_error_lazy(), as that is what is done internally in gsocket.c as well.
With blessings, thank you!