Skip to content

Commit 0997c9d

Browse files
committed
review
1 parent 92b7969 commit 0997c9d

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncConfig.swift

-7
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,6 @@ struct FileSyncConfig<VPN: VPNService, FS: FileSyncDaemon>: View {
103103
// Opens the log file in Console
104104
NSWorkspace.shared.open(fileSync.logFile)
105105
}
106-
}.task {
107-
// When the Window is visible, poll for session updates every
108-
// two seconds.
109-
while !Task.isCancelled {
110-
await fileSync.refreshSessions()
111-
try? await Task.sleep(for: .seconds(2))
112-
}
113106
}.onAppear {
114107
isVisible = true
115108
}.onDisappear {

Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,9 @@ struct VPNMenu<VPN: VPNService, FS: FileSyncDaemon>: View {
117117
.environmentObject(state)
118118
.onReceive(inspection.notice) { inspection.visit(self, $0) } // ViewInspector
119119
.task {
120-
// If there's a file sync session error, an icon will be displayed
121-
// next to the file sync button. The file sync window polls more
122-
// frequently when it's open.
123120
while !Task.isCancelled {
124121
await fileSync.refreshSessions()
125-
try? await Task.sleep(for: .seconds(15))
122+
try? await Task.sleep(for: .seconds(2))
126123
}
127124
}
128125
}

0 commit comments

Comments
 (0)