mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 05:45:18 +00:00
Fix warnings: remove unused msgID and unused mutable var in directed spool flush
This commit is contained in:
@@ -1118,14 +1118,13 @@ final class BLEService: NSObject {
|
|||||||
var out: [(String, BitchatPacket)] = []
|
var out: [(String, BitchatPacket)] = []
|
||||||
let now = Date()
|
let now = Date()
|
||||||
for (recipient, dict) in pendingDirectedRelays {
|
for (recipient, dict) in pendingDirectedRelays {
|
||||||
var remaining: [String: (packet: BitchatPacket, enqueuedAt: Date)] = [:]
|
for (_, entry) in dict {
|
||||||
for (msgID, entry) in dict {
|
|
||||||
if now.timeIntervalSince(entry.enqueuedAt) <= TransportConfig.bleDirectedSpoolWindowSeconds {
|
if now.timeIntervalSince(entry.enqueuedAt) <= TransportConfig.bleDirectedSpoolWindowSeconds {
|
||||||
out.append((recipient, entry.packet))
|
out.append((recipient, entry.packet))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Clear recipient bucket; will be re-spooled if still no links
|
// Clear recipient bucket; items will be re-spooled if still no links
|
||||||
pendingDirectedRelays[recipient] = remaining
|
pendingDirectedRelays.removeValue(forKey: recipient)
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user