Skip to content

Commit 79087ad

Browse files
committed
修正處理BGTask保活
1 parent e871e22 commit 79087ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

liveAPP/BackgroundTaskManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class BackgroundTaskManager {
2020

2121
func scheduleSocketKeepAlive() {
2222
#if os(iOS)
23-
cancelSocketKeepAlive()
23+
BGTaskScheduler.shared.cancel(taskRequestWithIdentifier: socketKeepAliveTaskID)
2424
let request = BGProcessingTaskRequest(identifier: socketKeepAliveTaskID)
2525
request.requiresNetworkConnectivity = true
2626
request.earliestBeginDate = Date(timeIntervalSinceNow: 5)

0 commit comments

Comments
 (0)