Permalink
Browse files

added noop polling

  • Loading branch information...
1 parent e54d649 commit 8ecce8d28ac4f858aa403724c77d55ea501c8336 andris9 committed Dec 9, 2011
Showing with 7 additions and 1 deletion.
  1. +6 −0 lib/gearman.js
  2. +1 −1 package.json
View
@@ -28,6 +28,10 @@ Gearman.prototype.init = function(){
this.currentWorkers = {};
this.workers = {};
+
+ this.noopTimer = setInterval(function(){
+ this.sendCommand("NOOP");
+ }, 15000);
}
Gearman.packetTypes = {
@@ -170,6 +174,8 @@ Gearman.prototype.close = function(){
Gearman.prototype.closeConnection = function(){
var i;
+ clearInterval(this.noopTimer);
+
if(this.connected){
if(this.socket){
try{
View
@@ -1,7 +1,7 @@
{
"name": "node-gearman",
"description": "Simple Gearman client/worker module for Node.JS",
- "version": "0.1.3",
+ "version": "0.1.4",
"author" : "Andris Reinman",
"maintainers":[
{

0 comments on commit 8ecce8d

Please sign in to comment.