mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Update src/browser/Session.zig
Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
This commit is contained in:
@@ -302,7 +302,7 @@ fn _wait(self: *Session, page: *Page, wait_ms: u32) !WaitResult {
|
|||||||
// minimize how long we'll poll for network I/O.
|
// minimize how long we'll poll for network I/O.
|
||||||
var ms_to_wait = @min(200, ms_to_next_task orelse 200);
|
var ms_to_wait = @min(200, ms_to_next_task orelse 200);
|
||||||
if (ms_to_wait > 10 and browser.hasBackgroundTasks()) {
|
if (ms_to_wait > 10 and browser.hasBackgroundTasks()) {
|
||||||
// if we have bakcground tasks, we don't want ot wait too
|
// if we have background tasks, we don't want to wait too
|
||||||
// long for a message from the client. We want to go back
|
// long for a message from the client. We want to go back
|
||||||
// to the top of the loop and run macrotasks.
|
// to the top of the loop and run macrotasks.
|
||||||
ms_to_wait = 10;
|
ms_to_wait = 10;
|
||||||
|
|||||||
Reference in New Issue
Block a user