Skip to content

Commit

Permalink
Avoid logging EOF for sftp input scanners
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Dec 27, 2023
1 parent 2e612e5 commit 0fb3813
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/impl/sftp/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"io"
"sync"
"time"

Expand Down Expand Up @@ -258,6 +259,9 @@ func (s *sftpReader) ReadBatch(ctx context.Context) (service.MessageBatch, servi
s.currentPath = ""
}
s.scannerMut.Unlock()
if errors.Is(err, io.EOF) {
err = service.ErrNotConnected
}
return nil, nil, err
}

Expand Down

0 comments on commit 0fb3813

Please sign in to comment.