Skip to content

Commit

Permalink
Merge pull request #570 from hannesa2/FixConnectionLostAction
Browse files Browse the repository at this point in the history
Fix connectionLostAction
  • Loading branch information
hannesa2 authored Feb 22, 2024
2 parents 4b0f774 + 5bedfe3 commit f1af923
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ class MqttAndroidClient @JvmOverloads constructor(
* Process a Connection Lost notification
*/
private fun connectionLostAction(data: Bundle?) {
val reason = data!!.parcelable(MqttServiceConstants.CALLBACK_EXCEPTION) as Exception?
val reason = data?.parcelable(MqttServiceConstants.CALLBACK_EXCEPTION) as Exception?
callbacksList.forEach {
it.connectionLost(reason)
}
Expand Down

0 comments on commit f1af923

Please sign in to comment.