From 424a00cf2951f8b96a59cea0964dd7f85a35a3a7 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 7 Aug 2014 19:40:41 +0800 Subject: [PATCH] Don't set interval too short. Otherwise it could be possible that the callback executes for multiple times before it is cleared. --- spec/node-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index 19fe1e09e2..bf13a06cd6 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -74,7 +74,7 @@ describe 'node feature', -> clear = -> remote.getGlobal('clearInterval')(interval) done() - interval = remote.getGlobal('setInterval')(clear, 0) + interval = remote.getGlobal('setInterval')(clear, 10) describe 'message loop', -> describe 'process.nextTick', ->