1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-06 02:23:59 +00:00

1. Set upperbound on number of Windows WaitHandles

2. Fixed Windows_IPC to DisconnectNamedPipe() on connected handled when 'end' is called
3. Fixed Windispatch to terminate on when close is emitted
This commit is contained in:
Bryan Roe
2020-05-19 01:14:18 -07:00
parent f115066e68
commit eba7419fc9
5 changed files with 33 additions and 17 deletions

View File

@@ -137,6 +137,7 @@ function connect(ipc)
});
global.ipcClient = require('net').createConnection({ path: ipcPath }, function ()
{
this.on('close', function () { process.exit(); });
this.on('data', function (c)
{
var cLen = c.readUInt32LE(0);
@@ -165,6 +166,8 @@ function connect(ipc)
if (cLen < c.length) { this.unshift(c.slice(cLen)); }
});
});
global.ipcClient.on('error', function () { process.exit(); });
global.ipc2Client.on('error', function () { process.exit(); });
}
module.exports = { dispatch: dispatch, connect: connect };