Skip to content

Commit b67bcbd

Browse files
committed
fix: sync loop context canceled err when canceled
1 parent 9caf498 commit b67bcbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/device-agent/states/connected/connected.go

+2
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ func (c *Connected) defaultSyncConfigLoop(ctx context.Context) error {
207207
return fmt.Errorf("session timed out (%w): %w", ErrUnauthenticated, e)
208208
case grpcstatus.Code(e) == codes.Unavailable:
209209
return fmt.Errorf("recv (%w): %w", ErrLostConnection, e)
210+
case grpcstatus.Code(e) == codes.Canceled:
211+
return fmt.Errorf("recv: %w", context.Canceled)
210212
case e != nil:
211213
return fmt.Errorf("recv: %w", e)
212214
}

0 commit comments

Comments
 (0)