Fix too short timeout interval

This commit is contained in:
Leon Böttger committed 2025-07-26 11:40:17 +02:00
1 parent b68e4a7345
commit 5ecc66d57b
2 files changed
+7 -3

No files matched your search

+5 -1
View File
@@ -30,7 +30,7 @@ class NearbyConnection {
private var connectionClosed: Bool = false
private var inactivityTimer: DispatchSourceTimer?
private let timeoutInterval: TimeInterval = 7
private let timeoutInterval: TimeInterval = 100 // seconds
// UKEY2-related state
var publicKey: ECPublicKey?
@@ -253,10 +253,14 @@ class NearbyConnection {
}
func sendTransferSetupFrame(_ frame: Sharing_Nearby_Frame) throws {
log("Sending transfer setup frame.")
try sendBytesPayload(data: frame.serializedData(), id: Int64.random(in: Int64.min ... Int64.max))
}
func sendBytesPayload(data: Data, id: Int64) throws {
log("Sending bytes payload with ID \(id) of length \(data.count)")
var transfer = Location_Nearby_Connections_PayloadTransferFrame()
transfer.packetType = .data
transfer.payloadChunk.offset = 0
+2 -2
View File
@@ -915,7 +915,7 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SHARED_BUILD = 51;
SHARED_BUILD = 52;
SHARED_VERSION = 1.10.3;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -974,7 +974,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SHARED_BUILD = 51;
SHARED_BUILD = 52;
SHARED_VERSION = 1.10.3;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";