mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-24 04:04:31 +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:
@@ -160,6 +160,12 @@ function Promise(promiseFunc)
|
||||
refTable[this._internal._hashCode()] = this._internal;
|
||||
this._internal.once('settled', function () { refTable[this._hashCode()] = null; });
|
||||
}
|
||||
Object.defineProperty(this, "completed", {
|
||||
get: function ()
|
||||
{
|
||||
return (this._internal.completed);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Promise.resolve = function resolve()
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user