summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoora <287346653@qq.com>2018-06-09 17:08:23 +0800
committerRyan Dahl <ry@tinyclouds.org>2018-06-09 11:08:23 +0200
commit072fcd6b0ef95e75281b3591bad38aaf4feb080b (patch)
tree040ade69eede0aba3ddc02d150277cc4d2c04d2d
parentc977cba123af280bde7bfaffc8a64756cc75ca30 (diff)
delete timer in the Map(timers) when call clearTimer (#215)
-rw-r--r--timers.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/timers.ts b/timers.ts
index cddb859d9..ed65128cd 100644
--- a/timers.ts
+++ b/timers.ts
@@ -81,6 +81,7 @@ export function setInterval(
}
export function clearTimer(id: number) {
+ timers.delete(id);
pubInternal("timers", {
command: pb.Msg.Command.TIMER_CLEAR,
timerClearId: id