|
|
@ -41,10 +41,10 @@ export abstract class IpcClientService<M extends Microservice = Microservice> ex |
|
|
|
public bootIpc(ipc: IPC) { |
|
|
|
// Connect to the server
|
|
|
|
return new Promise<void>((resolve, reject) => { |
|
|
|
this.rawIpcInstance!.connectTo(this.name, this.socketPath, () => { |
|
|
|
this.rawIpcInstance!.connectTo(this.NAME, this.socketPath, () => { |
|
|
|
this.__isConnected = true; |
|
|
|
this.__requestId = 0; |
|
|
|
this.__socket = ipc!.of[this.name]; |
|
|
|
this.__socket = ipc!.of[this.NAME]; |
|
|
|
this.installEventHandlers(this.__socket!); |
|
|
|
this.installMessageHandlers(); |
|
|
|
resolve(); |
|
|
@ -74,7 +74,7 @@ export abstract class IpcClientService<M extends Microservice = Microservice> ex |
|
|
|
* Shutdown the IPC service |
|
|
|
*/ |
|
|
|
public async shutdownIpc(ipc: IPC|null) { |
|
|
|
ipc?.disconnect(this.name); |
|
|
|
ipc?.disconnect(this.NAME); |
|
|
|
this.__socket?.removeAllListeners(); |
|
|
|
this.__socket?.destroy(); |
|
|
|
this.__socket = null; |
|
|
|