fix trivial compiler warning in net.c
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index ba1cfd2..af15eb0 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 = MAX(max, ret);
+       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;