Merge pull request #51 from Gloridea/master

fix - Can't connect to server on retry due to config.path is modified…

Awesome! thanks for the clarification!
This commit is contained in:
Brandon Nozaki Miller 2015-12-02 10:01:36 -08:00
commit fa8f159eea

View file

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