[Groonga-commit] groonga/express-kotoumi [master] The default host name should be "localhost"

Zurück zum Archiv-Index

YUKI Hiroshi null+****@clear*****
Fri Jan 18 17:25:51 JST 2013


YUKI Hiroshi	2013-01-18 17:25:51 +0900 (Fri, 18 Jan 2013)

  New Revision: 943e00e7fc3ba182b47209033977075294a5569b
  https://github.com/groonga/express-kotoumi/commit/943e00e7fc3ba182b47209033977075294a5569b

  Log:
    The default host name should be "localhost"

  Modified files:
    lib/backend-adaptor.js

  Modified: lib/backend-adaptor.js (+4 -6)
===================================================================
--- lib/backend-adaptor.js    2013-01-18 17:23:17 +0900 (455e85f)
+++ lib/backend-adaptor.js    2013-01-18 17:25:51 +0900 (b2c6aa5)
@@ -51,10 +51,9 @@ Connection.prototype._initSender = function() {
 };
 
 Connection.prototype._initReceiver = function() {
-  this._receiver = (
-    this._params.receiver ||
-    socketIo.listen(this._params.listenPort || DEFAULT_LISTEN_PORT)
-  );
+  this.hostName = this._params.hostName || 'localhost';
+  this.listenPort = this._params.listenPort || DEFAULT_LISTEN_PORT;
+  this._receiver = this._params.receiver || socketIo.listen(this.listenPort);
 
   this._receiver.sockets.on(
     'connection',
@@ -92,8 +91,7 @@ Connection.prototype.emitMessage = function(type, body, callback) {
   var envelope = {
     id:         id,
     date:       getCurrentTime(),
-    from:       this._params.hostname + ':' + this._params.listenPort,
-    replyTo:    this._params.hostname + ':' + this._params.listenPort,
+    replyTo:    this.hostName + ':' + this.listenPort,
     statusCode: 200,
     type:       type,
     body:       body
-------------- next part --------------
HTML����������������������������...
Download 



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