mirror of
https://github.com/golang/go
synced 2024-11-12 09:20:22 -07:00
runtime: correct test for when to poll network
Fixes #6610. R=golang-dev, khr CC=golang-dev https://golang.org/cl/14793043
This commit is contained in:
parent
667303f158
commit
88c448ba40
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user