Reset next_gethash_time_ in ResetGetHashErrors
If two parallel gethash requests are running and the first fails but the second succeeds, then gethash error counters are reset and next_gethash_time_ is not. In this case all following GetFullHashes calls (until time is out) does not incur actual network requests and gethash result is improperly reported as MIN_WAIT_DURATION_ERROR, even though server did not sent min_wait_duration to the client. Example steps (implemented in unit test): - Initiate two separate full hash requests. - Make the first request fail. - Make the second request succeed. - Call GetFullHashes method. Expected result: - As long as the second request was successful, the following requests are run as usual. Actual Result: - Network request is not issued. - MIN_WAIT_DURATION_ERROR is reported to SafeBrowsing.V4GetHash.Result Change-Id: Ieeb08046515f87239ec00d9ad13b80c257b59435 Reviewed-on: https://chromium-review.googlesource.com/1119908 Commit-Queue: Alexander Kalugin <akalugin@yandex-team.ru> Reviewed-by:Varun Khaneja <vakh@chromium.org> Cr-Commit-Position: refs/heads/master@{#575928}
Showing
Please register or sign in to comment