mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-30 12:54:36 +01:00
Wrap requestMtu in try-catch block
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user