We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5c2869 commit 7fa8a23Copy full SHA for 7fa8a23
WooCommerce/Classes/Tools/BackgroundTasks/BackgroundTaskRefreshDispatcher.swift
@@ -189,7 +189,13 @@ private struct BackgroundTaskSystemInfo {
189
monitor.cancel()
190
}
191
192
+ let timeoutTask = Task {
193
+ try await Task.sleep(nanoseconds: 1 * NSEC_PER_SEC)
194
+ continuation.finish()
195
+ }
196
+
197
if let path = await stream.first(where: { _ in true }) {
198
+ timeoutTask.cancel()
199
return NetworkInfo(path: path)
200
} else {
201
// Fallback in case no path is received.
0 commit comments