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:
Karl Seguin
2026-05-18 19:44:25 +08:00
parent 8b098a3c97
commit 49aa0ad1a9

View File

@@ -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,
}