diff options
Diffstat (limited to 'src/bun.js/event_loop.zig')
| -rw-r--r-- | src/bun.js/event_loop.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bun.js/event_loop.zig b/src/bun.js/event_loop.zig index a68376872..6a6107b05 100644 --- a/src/bun.js/event_loop.zig +++ b/src/bun.js/event_loop.zig @@ -375,8 +375,12 @@ pub const EventLoop = struct { while (promise.status(this.global.vm()) == .Pending) { this.tick(); - if (this.virtual_machine.uws_event_loop != null) { - this.runUSocketsLoop(); + if (promise.status(this.global.vm()) == .Pending) { + if (this.virtual_machine.uws_event_loop != null) { + this.runUSocketsLoop(); + } else if (this.waker) |*waker| { + _ = waker.wait() catch 0; + } } } }, |
