cdp/stdio: ignore writable

This commit is contained in:
CanadaHonk 2023-02-10 15:18:49 +00:00
parent b2f5229bc8
commit df59b2fb6a

View File

@ -124,8 +124,7 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => {
pipeWrite.on('error', () => {}); // ignore write error, likely just closed pipeWrite.on('error', () => {}); // ignore write error, likely just closed
_send = data => { _send = data => {
log('debug:', closed, !pipeWrite.writable); if (closed) return new Error('CDP connection closed');
if (closed || !pipeWrite.writable) return new Error('CDP connection closed');
pipeWrite.write(data); pipeWrite.write(data);
pipeWrite.write('\0'); pipeWrite.write('\0');