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:
parent
0612381369
commit
910c5903ad
1 changed files with 6 additions and 1 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue