[Groonga-commit] droonga/express-droonga at e69af84 [master] Register command definitions to the list of unified command sets before they are referred

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Oct 17 16:47:26 JST 2013


YUKI Hiroshi	2013-10-17 16:47:26 +0900 (Thu, 17 Oct 2013)

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

  Message:
    Register command definitions to the list of unified command sets before they are referred

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

  Modified: lib/adapter/socket.io.js (+4 -4)
===================================================================
--- lib/adapter/socket.io.js    2013-10-17 16:39:47 +0900 (29c5aa8)
+++ lib/adapter/socket.io.js    2013-10-17 16:47:26 +0900 (7e4a60f)
@@ -165,6 +165,10 @@ exports.register = function(application, server, params) {
         var unsubscribeEvent = registeredCommand.name + '.unsubscribe';
         var notificationEvent = registeredCommand.name + '.notification';
 
+        unifiedCommandSet[subscribeEvent] =
+          unifiedCommandSet[unsubscribeEvent] =
+          unifiedCommandSet[notificationEvent] = registeredCommand.definition;
+
         var subscriveHandler = createClientMessageHandler(subscribeEvent, socket, function() {
           if (handlers[notificationEvent])
             return;
@@ -184,10 +188,6 @@ exports.register = function(application, server, params) {
         if (unsubscribeHandler)
           socket.on(unsubscribeEvent, unsubscribeHandler);
 
-        unifiedCommandSet[subscribeEvent] = registeredCommand.definition;
-        unifiedCommandSet[unsubscribeEvent] = registeredCommand.definition;
-        unifiedCommandSet[notificationEvent] = registeredCommand.definition;
-
         events.push(notificationEvent);
       } else {
         var handler = createClientMessageHandler(registeredCommand.name, socket);
-------------- next part --------------
HTML����������������������������...
Download 



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