]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: correct test for when to poll network
authorIan Lance Taylor <iant@golang.org>
Thu, 17 Oct 2013 18:57:48 +0000 (11:57 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 17 Oct 2013 18:57:48 +0000 (11:57 -0700)
Fixes #6610.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/14793043

src/pkg/runtime/proc.c

index d5fc2dcac5f373f65d7592cfc6caab1078f9979b..eb3263fc91906da6fab61b4c65fd4f3e52b897b8 100644 (file)
@@ -2382,7 +2382,7 @@ sysmon(void)
                // poll network if not polled for more than 10ms
                lastpoll = runtime·atomicload64(&runtime·sched.lastpoll);
                now = runtime·nanotime();
-               if(lastpoll != 0 && lastpoll + 10*1000*1000 > now) {
+               if(lastpoll != 0 && lastpoll + 10*1000*1000 < now) {
                        runtime·cas64(&runtime·sched.lastpoll, lastpoll, now);
                        gp = runtime·netpoll(false);  // non-blocking
                        if(gp) {