cdp: don't try to send with ws when closed
This commit is contained in:
parent
efff1770e5
commit
870b6e5b40
@ -90,8 +90,7 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => {
|
||||
|
||||
ws.on('message', data => onMessage(data));
|
||||
|
||||
_send = data => ws.send(data);
|
||||
|
||||
_send = data => !closed && ws.send(data);
|
||||
_close = () => ws.close();
|
||||
} else {
|
||||
let pending = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user