From fadfb5ce61c7da52e6f090e9a0cbda8645029cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 27 Apr 2012 21:50:41 +0200 Subject: [PATCH] Send notification after 20ms --- file/acp/be.bastelstu.wcf.chat.serverPush/lib/server.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/file/acp/be.bastelstu.wcf.chat.serverPush/lib/server.coffee b/file/acp/be.bastelstu.wcf.chat.serverPush/lib/server.coffee index 28874f8..664e2a5 100644 --- a/file/acp/be.bastelstu.wcf.chat.serverPush/lib/server.coffee +++ b/file/acp/be.bastelstu.wcf.chat.serverPush/lib/server.coffee @@ -40,7 +40,9 @@ class Server initUnixSocket: () -> log 'Initializing Unix-Socket' socket = net.createServer ((c) -> - @socket.sockets.emit 'newMessage' + setTimeout (() -> + @socket.sockets.emit 'newMessage' + ).bind(@), 20 c.end() ).bind(@)