From 49fbad8c6fbe8c54c9b2dafff48eb14d36a5aa74 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 10 Apr 2015 21:08:22 +0300 Subject: [PATCH] Set event types on Windows if connect finished immediately --- source/net/streamsocket.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/net/streamsocket.cpp b/source/net/streamsocket.cpp index 1dab2e3..85f2b00 100644 --- a/source/net/streamsocket.cpp +++ b/source/net/streamsocket.cpp @@ -73,6 +73,9 @@ bool StreamSocket::connect(const SockAddr &addr) if(err==0) { connected = true; +#ifdef WIN32 + WSAEventSelect(priv->handle, *priv->event, FD_READ|FD_CLOSE); +#endif set_events(IO::P_INPUT); signal_connect_finished.emit(0); } -- 2.45.2