Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/53472
Change subject: Zero timeout flag on unpause
......................................................................
Zero timeout flag on unpause
When the normal limit timer fires while timers are paused, the timestamp
is recorded and the timer is recheduled on unpause. But we forgot to
zero out that timestamp, so the next time it is paused and unpaused it
would reschedule the timer again. This may lead to incorrect behavior.
Change-Id: Ib4118f7d1aed218ceb2fb567a65bb60a92ad21db
---
M timer.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/luasandbox
refs/changes/72/53472/1
diff --git a/timer.c b/timer.c
index 8cb3738..61bf4d0 100644
--- a/timer.c
+++ b/timer.c
@@ -614,9 +614,10 @@
luasandbox_timer_subtract(&delta, <s->pause_start);
luasandbox_timer_add(&delta, <s->pause_delta);
- // Zero out pause vars
+ // Zero out pause vars and expired timestamp (since we
handled it)
luasandbox_timer_zero(<s->pause_start);
luasandbox_timer_zero(<s->pause_delta);
+ luasandbox_timer_zero(<s->normal_expired_at);
// Restart timer
lts->normal_remaining = delta;
--
To view, visit https://gerrit.wikimedia.org/r/53472
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4118f7d1aed218ceb2fb567a65bb60a92ad21db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits