From a2e9c9fd4880b90cb7576e6d8d3eaa6322401a9d Mon Sep 17 00:00:00 2001 From: Joscha Rohmann Date: Thu, 12 Nov 2015 12:57:17 +0100 Subject: [PATCH] Fixed bug with 'UNIX' sockets on windows. Fixed that the client path gets extended with an ``\\\\.\\pipe\\`` when it already beginns with it. That is the case when reconnecting. --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index b066d07..13c2a07 100644 --- a/lib/client.js +++ b/lib/client.js @@ -47,7 +47,7 @@ function connect(){ if(!client.port){ client.log('Connecting client on Unix Socket :'.debug, client.path.variable); - if (process.platform ==='win32'){ + if (process.platform ==='win32' && !client.path.startsWith('\\\\.\\pipe\\')){ client.path = client.path.replace(/^\//, ''); client.path = client.path.replace(/\//g, '-'); client.path= '\\\\.\\pipe\\'+client.path;