Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 81c45ec

Browse files
authored
Refactor installApp function for improved clarity
1 parent 6e61041 commit 81c45ec

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Sources/prostore/install/installApp.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,13 @@ public func installApp(from ipaURL: URL) async throws -> AsyncThrowingStream<(ph
7777
continuation.finish(throwing: error)
7878
}
7979
cancellables.removeAll()
80-
HeartbeatManager.shared.stop()
8180

8281
case .broken(let error):
8382
// Broken connection or other fatal error
8483
DispatchQueue.main.async {
8584
continuation.finish(throwing: error)
8685
}
8786
cancellables.removeAll()
88-
HeartbeatManager.shared.stop()
8987

9088
default:
9189
break
@@ -118,18 +116,17 @@ public func installApp(from ipaURL: URL) async throws -> AsyncThrowingStream<(ph
118116
DispatchQueue.main.async {
119117
continuation.finish(throwing: error)
120118
}
121-
cancellables.removeAll()
122-
HeartbeatManager.shared.stop()
119+
cancellables.removeAll(
123120
}
124121
} // End Task
125122

126123
// If the consumer cancels/terminates the stream, cancel the install task and cleanup.
127124
continuation.onTermination = { @Sendable _ in
128125
installTask.cancel()
129126
cancellables.removeAll()
130-
HeartbeatManager.shared.stop()
131127
}
132128
}
133129
}
134130

135131

132+

0 commit comments

Comments
 (0)