fix processing queued packets

pull/330/head
andrekir 2021-12-25 19:30:45 -03:00
rodzic c4612f37b4
commit e093a29191
1 zmienionych plików z 4 dodań i 8 usunięć

Wyświetl plik

@ -931,18 +931,14 @@ class MeshService : Service(), Logging {
sendToRadio(packet) sendToRadio(packet)
} }
/// Process any packets that showed up too early private fun processQueuedPackets() {
/* private fun processEarlyPackets() {
earlyReceivedPackets.forEach { processReceivedMeshPacket(it) }
earlyReceivedPackets.clear()
offlineSentPackets.forEach { p -> offlineSentPackets.forEach { p ->
// encapsulate our payload in the proper protobufs and fire it off // encapsulate our payload in the proper protobufs and fire it off
sendNow(p) sendNow(p)
serviceBroadcasts.broadcastMessageStatus(p) serviceBroadcasts.broadcastMessageStatus(p)
} }
offlineSentPackets.clear() offlineSentPackets.clear()
} */ }
/** /**
* Change the status on a data packet and update watchers * Change the status on a data packet and update watchers
@ -1472,10 +1468,10 @@ class MeshService : Service(), Logging {
} }
} }
/// If we've received our initial config, our radio settings and all of our channels, send any queueed packets and broadcast connected to clients /// If we've received our initial config, our radio settings and all of our channels, send any queued packets and broadcast connected to clients
private fun onHasSettings() { private fun onHasSettings() {
// processEarlyPackets() // send any packets that were queued up processQueuedPackets() // send any packets that were queued up
// broadcast an intent with our new connection state // broadcast an intent with our new connection state
serviceBroadcasts.broadcastConnection() serviceBroadcasts.broadcastConnection()