Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Notify requests about network reachability in priority order
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshalamov committed Jan 14, 2019
1 parent 12295ef commit ab160ac
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion platform/default/src/mbgl/storage/online_file_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,18 @@ class OnlineFileSource::Impl {
private:

void networkIsReachableAgain() {
// Notify regular priority requests.
for (auto& request : allRequests) {
request->networkIsReachableAgain();
if (request->resource.priority == Resource::Priority::Regular) {
request->networkIsReachableAgain();
}
}

// Notify low priority requests.
for (auto& request : allRequests) {
if (request->resource.priority == Resource::Priority::Low) {
request->networkIsReachableAgain();
}
}
}

Expand Down

0 comments on commit ab160ac

Please sign in to comment.