2014-11-21 96 views
0

(Meteor.js庫1.x版)Meteor.setTimeout不返回處理服務器端

當我可以調用Meteor.setTimeout()客戶端它做什麼,我期待並返回一個句柄(本質上是一個號),我可以在以後使用clearTimeout等等 - 當我打電話Meteor.setTimeout()服務器端返回的是一個對象,它看起來像這樣:

{ _idleTimeout: 1, 
    _idlePrev: 
    { _idleNext: [Circular], 
     _idlePrev: [Circular], 
     msecs: 1, 
    ontimeout: [Function: listOnTimeout] }, 
    _idleNext: 
    { _idleNext: [Circular], 
     _idlePrev: [Circular], 
     msecs: 1, 
     ontimeout: [Function: listOnTimeout] }, 
     _idleStart: 1416549645303, 
     _onTimeout: [Function], 
     _repeat: false } 

任何想法?

回答

0

我測試過一個正常的node.js REPL,這就是setTimeout返回的結果。傳遞給Meteor.clearTimeout應該可以正常工作。唯一的問題是文檔錯誤地指出Meteor.clearTimeoutMeteor.clearInterval的參數的類型爲Number,而它只在客戶端上具有該類型。