[Groonga-commit] droonga/express-droonga at 7aaf409 [master] Find client socket from the subscriber id (workaround)

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Oct 17 17:57:53 JST 2013


YUKI Hiroshi	2013-10-17 17:57:53 +0900 (Thu, 17 Oct 2013)

  New Revision: 7aaf409d658b6f817a30e9012ed0987be8127647
  https://github.com/droonga/express-droonga/commit/7aaf409d658b6f817a30e9012ed0987be8127647

  Message:
    Find client socket from the subscriber id (workaround)

  Modified files:
    lib/adapter/socket.io.js

  Modified: lib/adapter/socket.io.js (+3 -1)
===================================================================
--- lib/adapter/socket.io.js    2013-10-17 17:55:55 +0900 (d66039f)
+++ lib/adapter/socket.io.js    2013-10-17 17:57:53 +0900 (ea2c638)
@@ -156,7 +156,9 @@ exports.register = function(application, server, params) {
     if (!Array.isArray(subscribers))
       subscribers = [subscribers];
     subscribers.forEach(function(subscriber) {
-      subscriber.emit('watch.notification', envelope.body);
+      subscriber = watchSubscribers[subscriber];
+      if (subscriber)
+        subscriber.emit('watch.notification', envelope.body);
     });
   };
   connection.on('watch.notification', watchNotificationHandler);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index