Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class RNMqttClient(reactContext: ReactApplicationContext)
this.disconnect()
} catch (e: MqttException) {
Log.e(NAME, "failed to disconnect", e)
} catch (e: IllegalArgumentException) {
Log.e(NAME, "failed to disconnect", e)
}
}

Expand Down Expand Up @@ -157,6 +159,14 @@ class RNMqttClient(reactContext: ReactApplicationContext)
)
promise.reject("INVALID_IDENTITY", e)
return
} catch (e: IllegalArgumentException) {
Log.e(
NAME,
"failed to load an identity from the Android key store",
e
)
promise.reject("INVALID_IDENTITY", e)
return
}
}

Expand Down Expand Up @@ -370,6 +380,10 @@ class RNMqttClient(reactContext: ReactApplicationContext)
Log.e(NAME, "failed to connect", e)
promise.reject("ERROR_CONNECTION", e)
return
} catch (e: IllegalArgumentException) {
Log.e(NAME, "failed to connect", e)
promise.reject("ERROR_CONNECTION", e)
return
}
}

Expand Down Expand Up @@ -409,6 +423,10 @@ class RNMqttClient(reactContext: ReactApplicationContext)
} catch (e: MqttException) {
Log.e(NAME, "failed to disconnect", e)
return
} catch (e: IllegalArgumentException) {
// maybe Invalid ClientHandle
Log.e(NAME, "failed to disconnect", e)
return
}
}

Expand Down