fix - Can't connect to server on retry due to config.path is modified in retry loop on win32 env
This commit is contained in:
parent
021b191af5
commit
b37f4dac42
1 changed files with 5 additions and 4 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue