[Groonga-commit] groonga/express-kotoumi [master] Remove dependency injectionability for message receiver

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Jan 29 18:34:15 JST 2013


YUKI Hiroshi	2013-01-29 18:34:15 +0900 (Tue, 29 Jan 2013)

  New Revision: 3a12ddbc78d8565ad8de1662d6bf885941bcad5c
  https://github.com/groonga/express-kotoumi/commit/3a12ddbc78d8565ad8de1662d6bf885941bcad5c

  Log:
    Remove dependency injectionability for message receiver

  Modified files:
    lib/backend/connection.js

  Modified: lib/backend/connection.js (+4 -7)
===================================================================
--- lib/backend/connection.js    2013-01-29 18:31:12 +0900 (d56523e)
+++ lib/backend/connection.js    2013-01-29 18:34:15 +0900 (976c7a5)
@@ -61,13 +61,10 @@ Connection.prototype._initReceiver = function() {
   this.receiveHostName = this._params.receiveHostName || DEFAULT_RECEIVE_HOST_NAME;
   this.receivePort = this._params.receivePort;
 
-  var receiver = this._params.receiver;
-  if (!receiver) {
-    receiver = new Receiver(this.receivePort);
-    receiver.listen((function() {
-      this.receivePort = receiver.port;
-    }).bind(this));
-  }
+  var receiver = new Receiver(this.receivePort);
+  receiver.listen((function() {
+    this.receivePort = receiver.port;
+  }).bind(this));
 
   this._receiver = receiver;
   this._receiver.on((this._params.tag || DEFAULT_FLUENT_TAG) + '.message',
-------------- next part --------------
HTML����������������������������...
Download 



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