mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
When using CDP, we poll the HTTP clients along with the CDP socket. Because this polling can be long, we first process any pending message. This can end up processing _all_ messages, in which case the poll will block for a long time. This change makes it so that when the initial processing processes 1+ message, we do not poll, but rather return. This allows the page lifecycle to be processed normally (and not just blocking on poll, waiting for the CDP client to send data).