[Groonga-commit] droonga/express-droonga at 821b406 [master] Fix missing "this"

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Oct 17 15:28:59 JST 2014


YUKI Hiroshi	2014-10-17 15:28:59 +0900 (Fri, 17 Oct 2014)

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

  Message:
    Fix missing "this"

  Modified files:
    lib/droonga-protocol/connection.js

  Modified: lib/droonga-protocol/connection.js (+2 -2)
===================================================================
--- lib/droonga-protocol/connection.js    2014-10-17 13:31:04 +0900 (77766c7)
+++ lib/droonga-protocol/connection.js    2014-10-17 15:28:59 +0900 (8aa4b35)
@@ -202,11 +202,11 @@ Connection.prototype.emitMessage = function(type, body, callback, options) {
 
     var event = 'reply:' + id;
     var timeoutId;
-    this.once(event, function(errorCode, response) {
+    this.once(event, (function(errorCode, response) {
       this._logger.debug('Connection.emitMessage.reply %d:', this._id, errorCode);
       clearTimeout(timeoutId);
       callback(errorCode, response);
-    });
+    }).bind(this));
     options.timeout = toPositiveInteger(options.timeout) ||
                         DEFAULT_RESPONSE_TIMEOUT;
     timeoutId = setTimeout((function() {
-------------- next part --------------
HTML����������������������������...
下载 



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