Skip to content

Commit

Permalink
extension: fix reqres without responses but with networking errors ha…
Browse files Browse the repository at this point in the history
…ving "Responded at" field set in the logs
  • Loading branch information
oxij committed Oct 14, 2024
1 parent a69fa68 commit fbbc055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension/background/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,7 @@ async function processOneAlmostDone(reqres, newProblematic, newLimbo, newQueued,
// `onCompleted` does in this case, but it does not, so we have to
// handle it specially here.
reqres.responded = true;
reqres.responseTimeStamp = reqres.emitTimeStamp;
reqres.statusCode = 200;
reqres.reason = "Assumed OK";
// so that it would be marked as problematic, since actual metatada is not available
Expand Down Expand Up @@ -3461,9 +3462,8 @@ function handleErrorOccurred(e) {
// loading gets interrupted by another extension or a service/shared
// worker.
reqres.generated = true;
// NB: not setting reqres.responded
reqres.responseTimeStamp = e.timeStamp;
reqres.fromCache = e.fromCache;
// NB: Not setting `reqres.responded`, nor `reqres.responseTimeStamp` here.
// NB: This then continues to (raceCondition).
}

Expand Down

0 comments on commit fbbc055

Please sign in to comment.