Wrap requestMtu in try-catch block

This commit is contained in:
Sylwester Zieliński
2023-08-10 13:03:24 +02:00
parent 2bbfe21abd
commit 9360d34f8f

View File

@@ -97,7 +97,11 @@ internal class UARTService : NotificationService() {
return@launch
}
client.requestMtu(Mtu.max)
try {
client.requestMtu(Mtu.max)
} catch (e: Exception) {
e.printStackTrace()
}
try {
val services = client.discoverServices()