Permalink
Browse files

Lint agent module.

  • Loading branch information...
1 parent 326e855 commit d5ebc19308e4ffeb5c1549f694fd5caa78a5ba88 @reid reid committed Mar 8, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/hub/agent.js
View
8 lib/hub/agent.js
@@ -40,7 +40,7 @@ function Agent(registration) {
this.setupEvents();
this.connect(registration.socket);
-};
+}
util.inherits(Agent, EventEmitter2);
@@ -78,13 +78,13 @@ Agent.prototype.next = function () {
if (this.urlQueue.length) {
this.socketEmitter.emit("test", this.urlQueue.shift());
this.waiting = false;
- return true;
} else {
this.waiting = true;
this.socketEmitter.emit("complete");
this.emit("complete");
- return false;
}
+
+ return !this.waiting;
};
Agent.prototype.available = function () {
@@ -109,7 +109,7 @@ Agent.prototype.alive = function () {
function AgentManager() {
this.agents = {};
EventEmitter2.call(this, {
- verbose:true
+ verbose: true
});
}

0 comments on commit d5ebc19

Please sign in to comment.