Magellan Linux

Contents of /trunk/vnc/patches/vnc-restart.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 750 byte(s)
-import

1 --- vnc-4_1-unixsrc/common/network/TcpSocket.cxx.restart 2005-03-04 09:02:21.000000000 +0000
2 +++ vnc-4_1-unixsrc/common/network/TcpSocket.cxx 2005-03-04 09:03:05.000000000 +0000
3 @@ -140,10 +140,14 @@
4 }
5
6 // Attempt to connect to the remote host
7 - if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
8 - int e = errorNumber;
9 - closesocket(sock);
10 - throw SocketException("unable to connect to host", e);
11 + for (;;) {
12 + if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
13 + int e = errorNumber;
14 + if (e == EINTR)
15 + continue;
16 + closesocket(sock);
17 + throw SocketException("unable to connect to host", e);
18 + } else break;
19 }
20
21 // Disable Nagle's algorithm, to reduce latency