Fix: fix network observer

This commit is contained in:
kr328 2021-11-14 20:56:57 +08:00
parent a5ba4b4d23
commit d20f19c08f

View File

@ -41,10 +41,10 @@ class NetworkObserveModule(service: Service) :
private var network: Network? = null
override fun onAvailable(network: Network) {
this.network = network
if (this.network != network)
networks.trySend(network)
this.network = network
}
override fun onLinkPropertiesChanged(network: Network, linkProperties: LinkProperties) {