mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(pipe): dispatch "disconnected" event when browser is terminated (#3472)
This commit is contained in:
@@ -27,7 +27,11 @@ class PipeTransport {
|
||||
this._pipeWrite = pipeWrite;
|
||||
this._pendingMessage = '';
|
||||
this._eventListeners = [
|
||||
helper.addEventListener(pipeRead, 'data', buffer => this._dispatch(buffer))
|
||||
helper.addEventListener(pipeRead, 'data', buffer => this._dispatch(buffer)),
|
||||
helper.addEventListener(pipeRead, 'close', () => {
|
||||
if (this.onclose)
|
||||
this.onclose.call(null);
|
||||
})
|
||||
];
|
||||
this.onmessage = null;
|
||||
this.onclose = null;
|
||||
|
||||
Reference in New Issue
Block a user