[Groonga-commit] droonga/express-droonga at 4ec2c24 [master] Store hostName and port to the connection object itself

Zurück zum Archiv-Index

YUKI Hiroshi null+****@clear*****
Fri Oct 17 16:48:16 JST 2014


YUKI Hiroshi	2014-10-17 16:48:16 +0900 (Fri, 17 Oct 2014)

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

  Message:
    Store hostName and port to the connection object itself

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

  Modified: lib/droonga-protocol/connection.js (+8 -6)
===================================================================
--- lib/droonga-protocol/connection.js    2014-10-17 16:43:33 +0900 (c3f1cb2)
+++ lib/droonga-protocol/connection.js    2014-10-17 16:48:16 +0900 (23e100b)
@@ -55,18 +55,20 @@ Connection.prototype._init = function() {
   this.defaultDataset = process.env.DROONGA_ENGINE_DEFAULT_DATASET ||
                           this._params.defaultDataset ||
                             '';
+  this.hostName = process.env.DROONGA_ENGINE_HOST ||
+                          this._params.hostName ||
+                            DEFAULT_FLUENT_HOST_NAME;
+  this.port = process.env.DROONGA_ENGINE_PORT ||
+                          this._params.port ||
+                            DEFAULT_FLUENT_PORT;
   this._initSender();
   this._initReceiver();
 };
 
 Connection.prototype._initSender = function(wait) {
   this._sendingMessages = {};
-  var options = { host: process.env.DROONGA_ENGINE_HOST ||
-                          this._params.hostName ||
-                            DEFAULT_FLUENT_HOST_NAME,
-                  port: process.env.DROONGA_ENGINE_PORT ||
-                          this._params.port ||
-                            DEFAULT_FLUENT_PORT };
+  var options = { host: this.hostName,
+                  port: this.port };
   var sender = fluent.createFluentSender(this.tag, options);
   this._sender = sender;
   this._sender.on('error', (function(error) {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index