[Groonga-commit] groonga/express-kotoumi [master] Use timeout option internally

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jan 23 18:07:45 JST 2013


YUKI Hiroshi	2013-01-23 18:07:45 +0900 (Wed, 23 Jan 2013)

  New Revision: 766a60bcd468acf4adeaf41b8670c621a5e82ba1
  https://github.com/groonga/express-kotoumi/commit/766a60bcd468acf4adeaf41b8670c621a5e82ba1

  Log:
    Use timeout option internally

  Modified files:
    lib/rest-adaptor.js

  Modified: lib/rest-adaptor.js (+2 -1)
===================================================================
--- lib/rest-adaptor.js    2013-01-23 18:00:08 +0900 (604677a)
+++ lib/rest-adaptor.js    2013-01-23 18:07:45 +0900 (e5fbe6c)
@@ -8,6 +8,7 @@ function createHandler(type,
 
   return (function(request, response) {
     var message = requestBuilder(request);
+    var timeout = message.timeout || null;
     connection.emitMessage(type, message, function(error, responseMessage) {
       if (error) {
         var body = responseMessage && responseMessage.body || null;
@@ -18,7 +19,7 @@ function createHandler(type,
         response.contentType('application/json');
         response.send(body, 200);
       }
-    });
+    }, timeout);
   });
 }
 exports.createHandler = createHandler;
-------------- next part --------------
HTML����������������������������...
Download 



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