blob: 1fb45a7d52aa44fb6b6c89643d3c74ba143ec376 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- vnc-4.0b4-unixsrc/network/TcpSocket.cxx.restart 2004-01-22 15:24:34.000000000 +0000
+++ vnc-4.0b4-unixsrc/network/TcpSocket.cxx 2004-01-22 15:27:22.000000000 +0000
@@ -131,10 +131,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;
|