blob: 8797a6a4e3a6a0a1ca2a69f0447a03974bca85ee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
--- src/tds/read.c.orig Thu Jan 15 17:04:28 2004
+++ src/tds/read.c Thu Jan 15 17:04:35 2004
@@ -164,6 +164,13 @@
buflen -= len;
got += len;
}
+
+ /* When we get a timeout on select(), return 0. Don't return -1, because
+ * that would lead to a disconnect
+ * OTOH, do not let this pass to prevent an infinite loop when there is
+ * no data on the wire */
+ if (retcode == 0)
+ return 0;
OK_TIMEOUT:
now = time(NULL);
|