Don't start request during callback

Fixes a separate but similar issue to
https://github.com/lightpanda-io/browser/pull/1689

Specifically, it prevents starting a request from within a libcurl handler, thus
avoiding an illegal recursive call.

(This commit also removes the failed function call debug logging for
DOMExceptions, as these aren't particularly abnormal / log-worthy)
This commit is contained in:
Karl Seguin
2026-03-02 12:04:02 +08:00
parent 82e3f126ff
commit b104c3bfe8
2 changed files with 12 additions and 6 deletions

View File

@@ -496,8 +496,10 @@ fn waitForInterceptedResponse(self: *Client, transfer: *Transfer) !bool {
// cases, the interecptor is expected to call resume to continue the transfer
// or transfer.abort() to abort it.
fn process(self: *Client, transfer: *Transfer) !void {
if (self.handles.get()) |conn| {
return self.makeRequest(conn, transfer);
if (self.handles.performing == false) {
if (self.handles.get()) |conn| {
return self.makeRequest(conn, transfer);
}
}
self.queue.append(&transfer._node);