From 245358ae961c64223d39f62b5a01ee68f2dfcb4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6ttger?= Date: Sat, 21 Mar 2026 21:51:19 +0100 Subject: [PATCH] Send keepalive ack during handshake --- NearbyShare/Connection/InboundNearbyConnection.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NearbyShare/Connection/InboundNearbyConnection.swift b/NearbyShare/Connection/InboundNearbyConnection.swift index 47864d4..6b2426b 100644 --- a/NearbyShare/Connection/InboundNearbyConnection.swift +++ b/NearbyShare/Connection/InboundNearbyConnection.swift @@ -83,7 +83,10 @@ class InboundNearbyConnection: NearbyConnection { frame.hasV1, frame.v1.hasType, case .keepAlive = frame.v1.type { - log("[InboundNearbyConnection \(self.id)] Ignoring keep-alive during handshake in state \(currentState)") + log("[InboundNearbyConnection \(self.id)] Received keep-alive during handshake in state \(currentState)") + if !frame.v1.hasKeepAlive || !frame.v1.keepAlive.ack { + sendKeepAlive(ack: true) + } return }