1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Use PeriodicalExecutor's resume

This commit is contained in:
Tim Düsterhus 2014-03-02 16:04:45 +01:00
parent c82ff3715a
commit 81cabf3dd8

View File

@ -446,7 +446,7 @@ load messages if the appropriate event arrives.
be.bastelstu.wcf.nodePush.onDisconnect -> be.bastelstu.wcf.nodePush.onDisconnect ->
console.log 'Enabling periodic loading' console.log 'Enabling periodic loading'
do getMessages do getMessages
pe.getMessages = new WCF.PeriodicalExecuter getMessages, v.config.reloadTime * 1e3 do pe.getMessages.resume
be.bastelstu.wcf.nodePush.onMessage 'be.bastelstu.chat.newMessage', getMessages be.bastelstu.wcf.nodePush.onMessage 'be.bastelstu.chat.newMessage', getMessages
be.bastelstu.wcf.nodePush.onMessage 'be.bastelstu.wcf.nodePush.tick60', getMessages be.bastelstu.wcf.nodePush.onMessage 'be.bastelstu.wcf.nodePush.tick60', getMessages