Skip to content

Commit

Permalink
Added agent.unload() to clear properties on the Agent.
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Jun 12, 2012
1 parent bf6be48 commit 15e6af1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/hub/agent.js
Expand Up @@ -115,6 +115,13 @@ Agent.prototype.dispatch = function (urls) {
this.next();
};

Agent.prototype.unload = function () {
this.connected = false;
this.seen = 0;
this.waiting = false;
this.emit("disconnected");
};

Agent.prototype.ping = function () {
this.connected = true;
this.seen = new Date();
Expand Down

0 comments on commit 15e6af1

Please sign in to comment.