updates: don't try to fetch one more difference when context has been cancelled

This commit is contained in:
Adam Van Ymeren
2025-07-08 11:43:32 -07:00
parent 4c9555eded
commit e6c3454e9f
2 changed files with 0 additions and 7 deletions
-3
View File
@@ -169,9 +169,6 @@ func (s *internalState) Run(ctx context.Context) error {
for {
select {
case <-ctx.Done():
if len(s.pts.pending) > 0 || len(s.qts.pending) > 0 || len(s.seq.pending) > 0 {
s.getDifferenceLogger(ctx)
}
return ctx.Err()
case u := <-s.externalQueue:
ctx := trace.ContextWithSpanContext(ctx, u.span)
@@ -112,10 +112,6 @@ func (s *channelState) Run(ctx context.Context) error {
s.log.Debug("Gap timeout")
s.getDifferenceLogger(ctx)
case <-ctx.Done():
if len(s.pts.pending) > 0 {
// This will probably fail.
s.getDifferenceLogger(ctx)
}
return ctx.Err()
case <-s.idleTimeout.C:
s.log.Debug("Idle timeout")