[Groonga-commit] droonga/express-droonga at e2b3eb9 [master] Add ability to replace the constructor function of Connection

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Oct 30 15:07:11 JST 2014


YUKI Hiroshi	2014-10-30 15:07:11 +0900 (Thu, 30 Oct 2014)

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

  Message:
    Add ability to replace the constructor function of Connection

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

  Modified: lib/droonga-protocol/connection-pool.js (+2 -1)
===================================================================
--- lib/droonga-protocol/connection-pool.js    2014-10-30 13:30:17 +0900 (d5818bd)
+++ lib/droonga-protocol/connection-pool.js    2014-10-30 15:07:11 +0900 (6cc6ec8)
@@ -77,7 +77,8 @@ ConnectionPool.prototype = {
     if (this._connections[hostName])
       return this._connections[hostName];;
 
-    return this._connections[hostName] = new Connection({
+    var klass = this._params.connectionClass || Connection;
+    return this._connections[hostName] = new klass({
       tag:             this._params.tag,
       defaultDataset:  this._params.defaultDataset,
       hostName:        hostName,
-------------- next part --------------
HTML����������������������������...
Download 



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