cdp: debug stdio pipe send

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

View File

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