Skip to content

Commit

Permalink
Use the right hostname when establishing the changes listener.
Browse files Browse the repository at this point in the history
  • Loading branch information
eee-c committed Apr 10, 2010
1 parent 8f55c90 commit 0e9890b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions changes/lib/listener.js
Expand Up @@ -19,7 +19,7 @@ var Changes = function (uri, options) {
options.feed = 'continuous';
this.url = url.parse(uri);
this.options = options;
this.h = http.createClient(this.url.port, url.host);
this.h = http.createClient(this.url.port, this.url.hostname);
this.buffer = '';
var c = this;
// sys.puts(this.url.pathname+'?'+querystring.stringify(options))
Expand Down Expand Up @@ -56,7 +56,7 @@ var Changes = function (uri, options) {
};

var start = function () {
var request = c.h.request("GET", c.url.pathname+'?'+querystring.stringify(options)+'&timeout=600000&heartbeat=600000', {'accept':'application/json'});
var request = c.h.request("GET", c.url.pathname+'?'+querystring.stringify(options)+'&heartbeat=600000', {'accept':'application/json'});
request.addListener('response', function(response) {response.addListener('data', changesHandler);});
request.close();
};
Expand Down

0 comments on commit 0e9890b

Please sign in to comment.