]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
1000 * 1000 microseconds is too much for Darwin
authorAndre <maan@p133.(none)>
Sat, 29 Apr 2006 23:28:17 +0000 (01:28 +0200)
committerAndre <maan@p133.(none)>
Sat, 29 Apr 2006 23:28:17 +0000 (01:28 +0200)
linux never complained about that, but Darwin returns -EINVAL.

recv.c

diff --git a/recv.c b/recv.c
index 95711f1fce1c4ea56f8bbe00ff829d5a8bbc401c..af15eb07efb005f8b959e764d74b1bf2a27db60d 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -82,12 +82,12 @@ recv:
        FD_ZERO(&rfds);
        FD_ZERO(&wfds);
        timeout.tv_sec = 0;
-       timeout.tv_usec = 1000 * 1000;
+       timeout.tv_usec = 999 * 1000;
        max = -1;
        ret = r->pre_select(&rn, &rfds, &wfds, &timeout);
        max = PARA_MAX(max, ret);
 
-       PARA_DEBUG_LOG("timeout: %lums\n", tv2ms(&timeout));
+       PARA_DEBUG_LOG("timeout: %lums, max: %d\n", tv2ms(&timeout), max);
        ret = para_select(max + 1, &rfds, &wfds, &timeout);
        if (ret < 0) {
                ret = -E_RECV_SELECT;