cdp: don't throw error on closed send
This commit is contained in:
parent
5053e5335c
commit
1a74923cff
@ -27,7 +27,7 @@ export default async ({ pipe: { pipeWrite, pipeRead } = {}, port }) => {
|
||||
|
||||
let msgId = 0;
|
||||
const sendMessage = async (method, params = {}, sessionId = undefined) => {
|
||||
if (closed) throw new Error('CDP connection closed');
|
||||
if (closed) return new Error('CDP connection closed');
|
||||
|
||||
const id = msgId++;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user