]> git.tdb.fi Git - libs/net.git/commitdiff
Don't consider calling poll_connect without a connection attempt an error
authorMikko Rasa <tdb@tdb.fi>
Sat, 6 Aug 2011 20:39:00 +0000 (23:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 6 Aug 2011 20:39:00 +0000 (23:39 +0300)
source/streamsocket.cpp

index 9147ad88861f02cfb4f01502b8df40fde3633698..ed506d6320881c4a4169b54d836da483538510ec 100644 (file)
@@ -82,7 +82,7 @@ bool StreamSocket::connect(const SockAddr &addr)
 bool StreamSocket::poll_connect(const Time::TimeDelta &timeout)
 {
        if(!connecting)
-               throw bad_socket_state("not connecting");
+               return false;
 
        IO::PollEvent res = poll(*this, IO::P_OUTPUT, timeout);
        if(res&IO::P_OUTPUT)