X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstreamsocket.cpp;h=56df99335fb6c0b19f84264e73aa10f94a0ba248;hb=02a6ddf010b763c6b08e706bf0c771c0fd250d25;hp=30c7efd77a35d2b257785e7af1ddb6b80f0156cd;hpb=3103b110c863c19a56cc176a173cc30ddf13afec;p=libs%2Fnet.git diff --git a/source/streamsocket.cpp b/source/streamsocket.cpp index 30c7efd..56df993 100644 --- a/source/streamsocket.cpp +++ b/source/streamsocket.cpp @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspnet -Copyright © 2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2008-2009 Mikkosoft Productions, Mikko Rasa Distributed under the LGPL */ @@ -107,7 +107,7 @@ int StreamSocket::connect(const SockAddr &addr) #ifdef WIN32 int err=WSAConnect(handle, &sa, size, 0, 0, 0, 0); - if(err=SOCKET_ERROR) + if(err==SOCKET_ERROR) { int err_code=WSAGetLastError(); if(err_code==WSAEWOULDBLOCK) @@ -144,6 +144,7 @@ int StreamSocket::connect(const SockAddr &addr) if(err==0) { connected=true; + set_events(IO::P_INPUT); signal_connect_finished.emit(0); }