diff --git a/serviceLibrary/src/main/java/info/mqtt/android/service/MqttAndroidClient.kt b/serviceLibrary/src/main/java/info/mqtt/android/service/MqttAndroidClient.kt index 56328b89..f8cbf12f 100755 --- a/serviceLibrary/src/main/java/info/mqtt/android/service/MqttAndroidClient.kt +++ b/serviceLibrary/src/main/java/info/mqtt/android/service/MqttAndroidClient.kt @@ -10,6 +10,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.eclipse.paho.client.mqttv3.* +import timber.log.Timber import java.io.IOException import java.io.InputStream import java.security.KeyManagementException @@ -1270,6 +1271,7 @@ class MqttAndroidClient @JvmOverloads constructor( } override fun onServiceDisconnected(name: ComponentName) { + Timber.d("Service disconnected") mqttService = null } } diff --git a/serviceLibrary/src/main/java/info/mqtt/android/service/MqttService.kt b/serviceLibrary/src/main/java/info/mqtt/android/service/MqttService.kt index 9500a198..71c9bc95 100644 --- a/serviceLibrary/src/main/java/info/mqtt/android/service/MqttService.kt +++ b/serviceLibrary/src/main/java/info/mqtt/android/service/MqttService.kt @@ -477,7 +477,7 @@ class MqttService : Service(), MqttTraceHandler { * @return the MqttConnection identified by this handle */ private fun getConnection(clientHandle: String): MqttConnection { - return connections[clientHandle] ?: throw IllegalArgumentException("Invalid ClientHandle") + return connections[clientHandle] ?: throw IllegalArgumentException("Invalid ClientHandle >$clientHandle<") } /**