Skip to content

Commit e10274a

Browse files
committed
sync: don't suggest a rescan on scan cancellation
This doesn't have a practical impact, since scan cancellation indicates that an endpoint is shutting down anyway, but it's a more "correct" return value. Signed-off-by: Jacob Howard <[email protected]>
1 parent 9dfe2a4 commit e10274a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/synchronization/endpoint/local/endpoint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ func (e *endpoint) Scan(ctx context.Context, _ *core.Entry, full bool) (*core.Sn
10741074
if e.watchMode == reifiedWatchModeRecursive {
10751075
e.logger.Debug("Performing accelerated scan with", len(e.recheckPaths), "recheck paths")
10761076
if err := e.scan(ctx, e.snapshot, e.recheckPaths); err != nil {
1077-
return nil, err, true
1077+
return nil, err, !errors.Is(err, core.ErrScanCancelled)
10781078
} else {
10791079
e.recheckPaths = make(map[string]bool)
10801080
}

0 commit comments

Comments
 (0)