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.
This commit is contained in:
Joscha Rohmann 2015-11-12 12:57:17 +01:00
parent e8f956db06
commit a2e9c9fd48
1 changed files with 1 additions and 1 deletions

View File

@ -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;