diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-09-20 20:45:01 +0200 |
---|---|---|
committer | Ivo van Dongen <info@ivovandongen.nl> | 2016-09-23 10:47:55 +0200 |
commit | c4420d081cb2678fb970a85eeae8645cf07deb8c (patch) | |
tree | 1e730a3d8d3228c896bda2734137f245f268e3df | |
parent | 496904306681e0f77316fbfb9127129338a20e34 (diff) | |
download | qtlocation-mapboxgl-c4420d081cb2678fb970a85eeae8645cf07deb8c.tar.gz |
[core] ensure network::Reachable is called only once
-rw-r--r-- | src/mbgl/storage/network_status.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/storage/network_status.cpp b/src/mbgl/storage/network_status.cpp index 1bd392d578..646bbf40be 100644 --- a/src/mbgl/storage/network_status.cpp +++ b/src/mbgl/storage/network_status.cpp @@ -22,11 +22,11 @@ NetworkStatus::Status NetworkStatus::Get() { } void NetworkStatus::Set(Status status) { - if (status == Status::Online) { + if (status == Status::Offline) { + online = false; + } else if(!online) { online = true; Reachable(); - } else { - online = false; } } |