Skip to content

Commit 6996880

Browse files
committed
Add reassuring comment about polling CloudConnected
1 parent 46f2c87 commit 6996880

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

component/file_cache/async.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ func (fc *FileCache) servicePendingOps() {
225225
return
226226
case <-fc.startScheduledUploads:
227227
// check if we're connected
228+
// exponential backoff is implemented inside CloudConnected(),
229+
// so we're safe to call it naively every second like this
228230
if !fc.NextComponent().CloudConnected() {
229231
// we are offline, wait for a while before checking again
230232
select {

0 commit comments

Comments
 (0)