From c4420d081cb2678fb970a85eeae8645cf07deb8c Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Tue, 20 Sep 2016 20:45:01 +0200 Subject: [PATCH] [core] ensure network::Reachable is called only once --- src/mbgl/storage/network_status.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mbgl/storage/network_status.cpp b/src/mbgl/storage/network_status.cpp index 1bd392d57..646bbf40b 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; } }