Add data transfer timer timeout

This commit is contained in:
Leon Böttger committed 2025-07-28 14:58:34 +02:00
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 {