Commit 88c448ba authored by Ian Lance Taylor's avatar Ian Lance Taylor

runtime: correct test for when to poll network

Fixes #6610.

R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/14793043
parent 667303f1
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment