From 4d806f78dc628419490be80858ff760cedd919b7 Mon Sep 17 00:00:00 2001 From: gloridea Date: Thu, 3 Dec 2015 03:45:12 +0900 Subject: [PATCH] fix unix socket is not working due to previous fix --- lib/client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 680920e..b678bf9 100644 --- a/lib/client.js +++ b/lib/client.js @@ -47,8 +47,10 @@ function connect(){ if(!client.port){ client.log('Connecting client on Unix Socket :'.debug, client.path.variable); + + var path = client.path; + if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){ - var path = client.path; path = path.replace(/^\//, ''); path = path.replace(/\//g, '-'); path= '\\\\.\\pipe\\'+path;