Skip to content

Commit

Permalink
Set the keepalive on the changes listener to 10 minutes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eee-c committed Apr 9, 2010
1 parent fc1217d commit 6aa1410
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.mkd
Expand Up @@ -10,7 +10,9 @@ To use the changes service:
> node lib/service.js http://127.0.0.1:5984

This will start the service, look for any design documents, and start any change listeners you've defined. It also checks every minute for new databases.
This will start the service, look for any design documents, and start any change listeners you've defined. It will listen for 10 minutes before the HTTP keepalive expires.

It also checks every minute for new databases.

To define a new listener in your design doc:

Expand Down
2 changes: 1 addition & 1 deletion changes/lib/listener.js
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), {'accept':'application/json'});
var request = c.h.request("GET", c.url.pathname+'?'+querystring.stringify(options)+'&timeout=600000', {'accept':'application/json'});
request.addListener('response', function(response) {response.addListener('data', changesHandler);});
request.close();
};
Expand Down

0 comments on commit 6aa1410

Please sign in to comment.