Browse files

update

  • Loading branch information...
1 parent d33402d commit b5eaf2a76bcf32b2e464429b22cfd8daff0f4cf2 andris9 committed Nov 28, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/gearman.js
View
8 lib/gearman.js
@@ -11,6 +11,11 @@ function Gearman(host, port, debug){
this.port = port || 4730;
this.host = host || "localhost";
+ this.init();
+}
+utillib.inherits(Gearman, Stream);
+
+Gearman.prototype.init = function(){
this.connected = this.connecting = this.processing = false;
this.processing = false;
@@ -24,7 +29,6 @@ function Gearman(host, port, debug){
this.workers = {};
}
-utillib.inherits(Gearman, Stream);
Gearman.packetTypes = {
CAN_DO: 1,
@@ -195,6 +199,8 @@ Gearman.prototype.closeConnection = function(){
delete this.currentWorkers[i];
}
}
+
+ this.init();
}
};

0 comments on commit b5eaf2a

Please sign in to comment.