chore(rpc): exit server upon pipe disconnect (#2836)
This commit is contained in:
parent
2540805bf2
commit
241d39f904
|
|
@ -29,6 +29,7 @@ export class Transport {
|
|||
constructor(pipeWrite: NodeJS.WritableStream, pipeRead: NodeJS.ReadableStream) {
|
||||
this._pipeWrite = pipeWrite;
|
||||
pipeRead.on('data', buffer => this._dispatch(buffer));
|
||||
pipeRead.on('close', () => process.exit(0));
|
||||
this.onmessage = undefined;
|
||||
this.onclose = undefined;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue