[Groonga-commit] groonga/express-droonga at b8b3f12 [master] Define options and callback separatelly from emitMessage()

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Thu Aug 1 13:47:33 JST 2013


YUKI Hiroshi	2013-08-01 13:47:33 +0900 (Thu, 01 Aug 2013)

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

  Message:
    Define options and callback separatelly from emitMessage()

  Modified files:
    lib/adapter/http.js

  Modified: lib/adapter/http.js (+9 -7)
===================================================================
--- lib/adapter/http.js    2013-08-01 13:46:38 +0900 (1dbe30b)
+++ lib/adapter/http.js    2013-08-01 13:47:33 +0900 (998bdd7)
@@ -20,11 +20,8 @@ function createHandler(params) {
     var messageType = result[0];
     var body = result[1];
     var timeout = body.timeout || null;
-
-    connection.emitMessage(
-      messageType,
-      body,
-      function(error, envelope) {
+    var options = { timeout: timeout };
+    var callback = function(error, envelope) {
         debug('adapter.rest.createHandler.handle.response');
         if (error) {
           debug('adapter.rest.createHandler.handle.response.error:', error);
@@ -39,8 +36,13 @@ function createHandler(params) {
           }
           response.jsonp(body, 200);
         }
-      },
-      { timeout: timeout }
+      }
+
+    connection.emitMessage(
+      messageType,
+      body,
+      callback,
+      options
     );
   });
 }
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る