From ef85356f454ea0729b441909ab795ff9302b43e6 Mon Sep 17 00:00:00 2001 From: crs Date: Thu, 29 Jul 2004 21:48:40 +0000 Subject: [PATCH] Worked around bug/weirdness on OS X. It's reporting that a non-blocking connect is available for writing (i.e. the connection was successful) when the connection has actually failed. This caused synergy to rapidly retry connecting. This change makes synergy check for a connection error whether one was reported or not. Thankfully, OS X does correctly set the socket error state when it bogusly reports a successful connection so we can tell the connection failed. --- lib/net/CTCPSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/CTCPSocket.cpp b/lib/net/CTCPSocket.cpp index 213a0046..61ff3b8c 100644 --- a/lib/net/CTCPSocket.cpp +++ b/lib/net/CTCPSocket.cpp @@ -442,7 +442,7 @@ CTCPSocket::serviceConnecting(ISocketMultiplexerJob* job, // connection refused. when that happens it at least doesn't // report the socket as being writable so synergy is able to time // out the attempt.) - if (true || error) { + if (error || true) { try { // connection may have failed or succeeded ARCH->throwErrorOnSocket(m_socket);