Skip to content

Commit

Permalink
Merge pull request #591 from SM2A/bugfix-keepalive-ping
Browse files Browse the repository at this point in the history
Fix keepalive ping not sending
  • Loading branch information
hannesa2 authored Mar 25, 2024
2 parents 0ea7458 + 516b875 commit c6812e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal class AlarmPingSender(val service: MqttService) : MqttPingSender {
override fun start() {
val action = MqttServiceConstants.PING_SENDER + clientComms!!.client.clientId
Timber.d("Register AlarmReceiver to MqttService$action")
ContextCompat.registerReceiver(service, alarmReceiver, IntentFilter(action), ContextCompat.RECEIVER_NOT_EXPORTED)
ContextCompat.registerReceiver(service, alarmReceiver, IntentFilter(action), ContextCompat.RECEIVER_EXPORTED)
pendingIntent = PendingIntent.getBroadcast(service, 0, Intent(action), pendingIntentFlags)
schedule(clientComms!!.keepAlive)
hasStarted = true
Expand Down

0 comments on commit c6812e5

Please sign in to comment.