Skip trying to poll rootless when in root mode

This commit is contained in:
Mygod
2022-12-04 12:40:55 -05:00
parent bfc304a480
commit d0d27660c7

View File

@@ -152,7 +152,7 @@ abstract class IpMonitor {
fun flushAsync() = GlobalScope.launch(Dispatchers.IO) { flush() } fun flushAsync() = GlobalScope.launch(Dispatchers.IO) { flush() }
private suspend fun work(server: RootServer?): RootServer? { private suspend fun work(server: RootServer?): RootServer? {
if (currentMode != Mode.PollRoot) try { if (currentMode != Mode.PollRoot && currentMode != Mode.MonitorRoot) try {
poll() poll()
return server return server
} catch (e: IOException) { } catch (e: IOException) {