Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cdp/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,12 @@ export class CDPClient {
const result = await Promise.race([
this.evaluate('1+1'),
new Promise<never>((_, reject) =>
setTimeout(() => reject(new Error('health check timeout')), 3000),
setTimeout(() => reject(new Error('health check timeout')), 10000),
),
])
return result.result?.value === 2
} catch {
} catch (err) {
this.logger.debug(`Health check failed: ${err instanceof Error ? err.message : String(err)}`)
this.state.connected = false
return false
}
Expand Down
Loading