Kouhei Sutou
null+****@clear*****
Sun Jul 21 19:59:07 JST 2013
Kouhei Sutou 2013-07-21 19:59:07 +0900 (Sun, 21 Jul 2013) New Revision: aa5a3f5768c87bee1a086b9ca079530e3485ccdb https://github.com/groonga/express-droonga/commit/aa5a3f5768c87bee1a086b9ca079530e3485ccdb Message: connection: fix wrong inheritance way It shares some objects with instances. util.inherits() is the best way to inherit. Modified files: lib/backend/connection.js Modified: lib/backend/connection.js (+2 -1) =================================================================== --- lib/backend/connection.js 2013-07-21 19:27:26 +0900 (0498ad3) +++ lib/backend/connection.js 2013-07-21 19:59:07 +0900 (426c700) @@ -9,6 +9,7 @@ var EventEmitter = require('events').EventEmitter; var fluent = require('fluent-logger'); var FluentReceiver = require('./receiver').FluentReceiver; +var util = require('util'); var debug = require('../debug'); var DEFAULT_FLUENT_TAG = @@ -37,7 +38,7 @@ function Connection(params) { this._init(); } -Connection.prototype = new EventEmitter(); +util.inherits(Connection, EventEmitter); Connection.prototype._init = function() { this._callbacks = {}; -------------- next part -------------- HTML����������������������������...Download