Commit 35d76115 authored by Mygod's avatar Mygod

Add state check before sending initial trafficUpdated event

parent d10acf52
......@@ -98,7 +98,7 @@ trait BaseService extends Service {
}, 1000, 1000)
}
TrafficMonitor.updateRate()
cb.trafficUpdated(profile.id,
if (state == State.CONNECTED) cb.trafficUpdated(profile.id,
TrafficMonitor.txRate, TrafficMonitor.rxRate, TrafficMonitor.txTotal, TrafficMonitor.rxTotal)
}
......
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