add ticking where there should be

(cherry picked from commit f9a3605601130e5daf765d121d322a37592409ae)
This commit is contained in:
Jeff Becker 2019-01-14 12:02:02 -05:00 committed by Rick V
parent 6913c01524
commit 3fd8f27b01
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

View File

@ -181,7 +181,18 @@ tun_ev_loop(void* unused)
GetQueuedCompletionStatus(tun_event_queue, &size, &listener, &ovl, 100);
if(!alert)
{
// tick listeners on io timeout, this is required to be done every tick
// cycle regardless of any io being done, this manages the internal state
// of the tun logic
for(const auto& tun : tun_listeners)
{
if(tun->t->tick)
tun->t->tick(tun->t);
tun->flush_write();
}
continue; // let's go at it once more
}
if(listener == (ULONG_PTR)~0)
break;
// if we're here, then we got something interesting :>