Ignore keepalive during handshake

This commit is contained in:
Leon Böttger authored and Leon Böttger committed 2026-03-21 21:09:54 +01:00
1 parent 50d4d4ee92
commit 04e056da02
1 file changed
+10
@@ -76,6 +76,16 @@ class InboundNearbyConnection: NearbyConnection {
if currentState != .receivingFiles {
log("[InboundNearbyConnection \(self.id)] Received frame in state \(currentState)...")
}
if !encryptionDone,
currentState != .initial,
let frame = try? Location_Nearby_Connections_OfflineFrame(serializedBytes: frameData),
frame.hasV1,
frame.v1.hasType,
case .keepAlive = frame.v1.type {
log("[InboundNearbyConnection \(self.id)] Ignoring keep-alive during handshake in state \(currentState)")
return
}
do {
switch currentState {