mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-20 05:16:02 +00:00
Fix too short timeout interval
This commit is contained in:
1 parent
b68e4a7345
commit
5ecc66d57b
2 files changed
+7
-3
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user