mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
On blocking read failure, break from loop
Blocking read failure almost certainly means a disconnect client. As-is, that's an endless loop. Instead, fail the request.
This commit is contained in:
@@ -530,7 +530,9 @@ pub fn syncRequest(self: *Client, allocator: Allocator, req: Request) !SyncRespo
|
||||
switch (status) {
|
||||
.cdp_socket => {
|
||||
const cdp = self.cdp_client.?;
|
||||
_ = cdp.blocking_read(cdp.ctx);
|
||||
if (cdp.blocking_read(cdp.ctx) == false) {
|
||||
return error.ClientDisconnected;
|
||||
}
|
||||
},
|
||||
.normal => continue,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user