Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
463b4db091 | |||
66f463549d | |||
ea47e1afc0 | |||
68132b996b |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartipc",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.7",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartipc",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.7",
|
||||
"private": false,
|
||||
"description": "node inter process communication",
|
||||
"main": "dist/index.js",
|
||||
|
@ -30,7 +30,7 @@ tap.test('should create a client', async tools => {
|
||||
clientIpc.sendMessage('hi', { awesome: 'yes' });
|
||||
});
|
||||
|
||||
tap.test('should terminate the smartipc process', async (tools) => {
|
||||
tap.test('should terminate the smartipc process', async tools => {
|
||||
await tools.delayFor(1000);
|
||||
await clientIpc.stop();
|
||||
await serverIpc.stop();
|
||||
|
@ -53,7 +53,7 @@ export class SmartIpc {
|
||||
}
|
||||
|
||||
for (const handler of this.handlers) {
|
||||
ipcEventEmitter.on(handler.keyword, (dataArg) => {
|
||||
ipcEventEmitter.on(handler.keyword, dataArg => {
|
||||
handler.handlerFunc(dataArg);
|
||||
});
|
||||
}
|
||||
@ -65,10 +65,10 @@ export class SmartIpc {
|
||||
public async stop() {
|
||||
switch (this.options.type) {
|
||||
case 'server':
|
||||
this.ipc.server.stop();
|
||||
break;
|
||||
this.ipc.server.stop();
|
||||
break;
|
||||
case 'client':
|
||||
break;
|
||||
break;
|
||||
}
|
||||
plugins.smartdelay.delayFor(2000).then(() => {
|
||||
process.exit(0);
|
||||
|
Reference in New Issue
Block a user