mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 14:26:01 +00:00
Add data transfer timer timeout
This commit is contained in:
1 parent
6985d4b1ba
commit
de7cd2bf98
3 files changed
+31
-4
No files matched your search
@@ -362,6 +362,7 @@ class OutboundNearbyConnection: NearbyConnection {
|
||||
switch frame.v1.connectionResponse.status {
|
||||
case .accept:
|
||||
currentState = .sendingFiles
|
||||
isTransferring = true
|
||||
delegate?.outboundConnectionTransferAccepted(connection: self)
|
||||
|
||||
if let textToSend = textToSend {
|
||||
@@ -457,7 +458,7 @@ class OutboundNearbyConnection: NearbyConnection {
|
||||
// only for logging
|
||||
self.bytesTransferred += Int64(fileBuffer.count)
|
||||
|
||||
startInactivityTimer()
|
||||
startAndResetHeartbeatTimer()
|
||||
delegate?.outboundConnection(connection: self, transferProgress: Double(totalBytesSent) / Double(totalBytesToSend))
|
||||
|
||||
if currentTransfer!.currentOffset == currentTransfer!.totalBytes {
|
||||
|
||||
Reference in new issue
Block a user