diff options
author | Ian Lance Taylor <iant@golang.org> | 2013-10-17 11:57:48 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2013-10-17 11:57:48 -0700 |
commit | 0482f505bed1612db745cf53b9c22b6705e1f92d (patch) | |
tree | cce5ed03370caa4f4e10208fac2fe448f1fa3993 /src | |
parent | 18fa3f747734fc3b47ba0b599989d2f5bbd5b74b (diff) | |
download | go-0482f505bed1612db745cf53b9c22b6705e1f92d.tar.gz |
runtime: correct test for when to poll network
Fixes issue 6610.
R=golang-dev, khr
CC=golang-dev
https://codereview.appspot.com/14793043
Diffstat (limited to 'src')
-rw-r--r-- | src/pkg/runtime/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index d5fc2dcac..eb3263fc9 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) { |