kotlin-ipv8
kotlin-ipv8 copied to clipboard
Possible crash after ENETUNREACH
trafficstars
When a device registers an ENETUNREACH IO error, kotlin-ipv8 can crash, due to the UdpEndpoint.kt code. Stack trace:
Fatal Exception: java.io.IOException: sendto failed: ENETUNREACH (Network is unreachable)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:576)
at libcore.io.IoBridge.sendto(IoBridge.java:544)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:125)
at java.net.DatagramSocket.send(DatagramSocket.java:723)
at nl.tudelft.ipv8.messaging.udp.UdpEndpoint$send$2.invokeSuspend(UdpEndpoint.kt:75) <-------------------------
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:561)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:727)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:667)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:655)