Update timer.d

Don't remove callback when timer is periodic because after first hit cb cannot be called again?
This commit is contained in:
Satoshi 2016-12-12 11:31:16 +01:00 committed by GitHub
parent 7e9031439c
commit bfe1c46a73

View file

@ -63,7 +63,10 @@ final class LoopTimeoutTimerDriver : EventDriverTimers {
foreach (tm; m_firedTimers) {
auto cb = tm.callback;
tm.callback = null;
if (!tm.pending) {
tm.callback = null;
}
if (cb) cb(tm.id);
}