Skip to content

Commit

Permalink
Merge pull request #8 from ShareChat/handle_unsubscribe_topic_length_…
Browse files Browse the repository at this point in the history
…crash

Handled crash for topic length
  • Loading branch information
dilraj-singh1997 authored Jun 7, 2023
2 parents e048eb3 + 088e371 commit cec1526
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/script-ext.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
gitVersionCode = ""//grgit.tag.list().size()
gitVersionName = "0.2.0"//grgit.describe(tags: true, always: true)
gitVersionName = "0.3.0"//grgit.describe(tags: true, always: true)
println("version : $gitVersionName")
}
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,15 @@ internal class MqttConnection(
timeTakenMillis = (clock.nanoTime() - unsubscribeStartTime).fromNanosToMillis()
)
runnableScheduler.scheduleMqttHandleExceptionRunnable(mqttException, true)
} catch (illegalArgumentException: IllegalArgumentException) {
connectionConfig.connectionEventHandler.onMqttUnsubscribeFailure(
topics = topics,
throwable = MqttException(
REASON_CODE_INVALID_SUBSCRIPTION.toInt(),
illegalArgumentException
),
timeTakenMillis = (clock.nanoTime() - unsubscribeStartTime).fromNanosToMillis()
)
}
}
}
Expand Down

0 comments on commit cec1526

Please sign in to comment.