Update dependencies

This commit is contained in:
Mygod
2019-10-24 10:47:02 +08:00
parent 2563457a0d
commit 13c43f9b0e
6 changed files with 34 additions and 22 deletions

View File

@@ -17,7 +17,6 @@ import be.mygod.vpnhotspot.util.StickyEvent1
import be.mygod.vpnhotspot.util.broadcastReceiver
import be.mygod.vpnhotspot.widget.SmartSnackbar
import kotlinx.coroutines.*
import timber.log.Timber
@RequiresApi(26)
class LocalOnlyHotspotService : IpNeighbourMonitoringService(), CoroutineScope {

View File

@@ -115,7 +115,7 @@ class Routing(private val caller: Any, private val downstream: String) : IpNeigh
private val hostAddress = try {
val addresses = NetworkInterface.getByName(downstream)!!.interfaceAddresses!!
.filter { it.address is Inet4Address }
if (addresses.size > 1) Timber.w(IllegalArgumentException("More than one addresses was found: $addresses"))
if (addresses.size > 1) error("More than one addresses was found: $addresses")
addresses.first()
} catch (e: Exception) {
throw InterfaceNotFoundException(e)