From 88c448ba40a29ac96563e9945d2af17fba779d23 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 17 Oct 2013 11:57:48 -0700 Subject: [PATCH] runtime: correct test for when to poll network Fixes #6610. R=golang-dev, khr CC=golang-dev https://golang.org/cl/14793043 --- src/pkg/runtime/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index d5fc2dcac5..eb3263fc91 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -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) { -- 2.50.0