1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-1548 App | Fix | Try/catch 'setInterfaceGetter' call to Middleware service (#210)

This commit is contained in:
Evgenii Kozlov 2023-07-17 14:30:06 +02:00 committed by uburoiubu
parent 0612381369
commit 910c5903ad
No known key found for this signature in database
GPG key ID: C8FB80E0A595FBB6

View file

@ -5,6 +5,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import service.InterfaceGetter
import service.Service
import timber.log.Timber
/**
* This class is used for sending local Ip addresses to middleware.
@ -18,7 +19,11 @@ class LocalNetworkAddressProvider(
fun start() {
scope.launch(dispatcher) {
Service.setInterfaceGetter(interfaceProvider)
try {
Service.setInterfaceGetter(interfaceProvider)
} catch (e: Exception) {
Timber.e(e, "Failed to set interface getter")
}
}
}
}