From b37f4dac42baee14ab7c3795692d1befd1c7d06d Mon Sep 17 00:00:00 2001 From: Gloridea Date: Tue, 1 Dec 2015 04:53:06 +0900 Subject: [PATCH] fix - Can't connect to server on retry due to config.path is modified in retry loop on win32 env --- lib/client.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/client.js b/lib/client.js index 13c2a07..680920e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -48,13 +48,14 @@ function connect(){ if(!client.port){ client.log('Connecting client on Unix Socket :'.debug, client.path.variable); if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){ - client.path = client.path.replace(/^\//, ''); - client.path = client.path.replace(/\//g, '-'); - client.path= '\\\\.\\pipe\\'+client.path; + var path = client.path; + path = path.replace(/^\//, ''); + path = path.replace(/\//g, '-'); + path= '\\\\.\\pipe\\'+path; } client.socket = net.connect( { - path:client.path + path: path } ); }else{