diff --git a/example/unixSocket/basic/hello-client.js b/example/unixSocket/basic/hello-client.js index e3fb343..83d9234 100644 --- a/example/unixSocket/basic/hello-client.js +++ b/example/unixSocket/basic/hello-client.js @@ -36,8 +36,9 @@ ipc.connectTo( 'app.message', function(data){ ipc.log('got a message from world : '.debug, data); - ipc.disconnect('world'); } ); + + console.log(ipc.of.world.destroy); } ); diff --git a/lib/client.js b/lib/client.js index f398f23..e18e4bf 100644 --- a/lib/client.js +++ b/lib/client.js @@ -74,7 +74,7 @@ function connect(){ 'connect', function(){ client.trigger('connect'); - client.retriesRemaining=client.config.maxRetries||0; + client.retriesRemaining=client.config.maxRetries; client.log('retrying reset') } ); @@ -82,10 +82,10 @@ function connect(){ client.socket.on( 'close', function(){ - client.log('connection closed'.notice ,client.id.variable , client.path.variable, client.retriesRemaining+' of '+client.config.maxRetries); + client.log('connection closed'.notice ,client.id.variable , client.path.variable, client.retriesRemaining+' tries remaining of '+client.config.maxRetries); if( - (client.config.maxRetries!==false && !client.config.stopRetrying) || client.retriesRemaining<1 + client.config.stopRetrying || client.retriesRemaining<1 ){ client.log( diff --git a/node-ipc.js b/node-ipc.js index a725f5f..1482b86 100644 --- a/node-ipc.js +++ b/node-ipc.js @@ -34,7 +34,7 @@ var defaults={ silent : false, maxConnections : 100, retry : 500, - maxRetries : false, + maxRetries : Infinity, stopRetrying : false, IPType : IPType }