Applied vnc-restart.patch from FC3 package.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@182 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/network/TcpSocket.cxx b/network/TcpSocket.cxx
index b536e67..4c4e8d3 100644
--- a/network/TcpSocket.cxx
+++ b/network/TcpSocket.cxx
@@ -111,10 +111,14 @@
   }
 
   // Attempt to connect to the remote host
-  if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
-    int e = errorNumber;
-    closesocket(sock);
-    throw SocketException("unable to connect to host", e);
+  for (;;) {
+    if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
+      int e = errorNumber;
+      if (e == EINTR)
+	continue;
+      closesocket(sock);
+      throw SocketException("unable to connect to host", e);
+    } else break;
   }
 
   int one = 1;