Commit b3e2ef0b authored by lizeb's avatar lizeb Committed by Commit bot

tools/android/loading: Don't fail when an unknown request fails.

When fetching a page, sometimes a "LoadingFailed" notification is
delivered for a request that was never started, with a good network on
which failed requests are not expected.
Log a warning instead of failing in this case.

Review-Url: https://codereview.chromium.org/1705693002
Cr-Commit-Position: refs/heads/master@{#397124}
parent cbe59a46
......@@ -796,7 +796,9 @@ class RequestTrack(devtools_monitor.Track):
self._FinalizeRequest(request_id)
def _LoadingFailed(self, request_id, _):
assert request_id in self._requests_in_flight
if request_id not in self._requests_in_flight:
logging.warning('An unknown request failed: %s' % request_id)
return
(r, _) = self._requests_in_flight[request_id]
r.failed = True
self._requests_in_flight[request_id] = (r, RequestTrack._STATUS_FINISHED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment