From: Mikko Rasa Date: Sat, 6 Aug 2011 20:39:00 +0000 (+0300) Subject: Don't consider calling poll_connect without a connection attempt an error X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=18fd377f86b47234d1598524092167a5930b3e3b;p=libs%2Fnet.git Don't consider calling poll_connect without a connection attempt an error --- diff --git a/source/streamsocket.cpp b/source/streamsocket.cpp index 9147ad8..ed506d6 100644 --- a/source/streamsocket.cpp +++ b/source/streamsocket.cpp @@ -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)