1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-04 01:23:21 +00:00

Changed where IPC server is closed

This commit is contained in:
Bryan Roe
2020-05-20 12:22:09 -07:00
parent 16a2f437c3
commit f4b7c13888
2 changed files with 3 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ function dispatch(options)
{
this.parent._control = s;
this.parent._control._parent = this;
this.close();
this.parent.invoke = function (method, args)
{
var d, h = Buffer.alloc(4);
@@ -56,12 +57,12 @@ function dispatch(options)
this._control.write(h);
this._control.write(d);
};
s.once('end', function () { this._parent.close(); });
});
ret._ipc.once('connection', function onConnect(s)
{
this.parent._client = s;
this.parent._client._parent = this;
this.close();
var d, h = Buffer.alloc(4);
for (var m in this.parent.options.modules)
@@ -75,7 +76,6 @@ function dispatch(options)
h.writeUInt32LE(d.length + 4);
s.write(h);
s.write(d);
s.once('end', function () { this._parent.close(); });
this.parent.emit('connection', s);
});