mirror of
https://github.com/samuelncui/acp.git
synced 2026-01-03 10:05:16 +00:00
fix: eof for read
This commit is contained in:
4
copy.go
4
copy.go
@@ -209,7 +209,9 @@ func (c *Copyer) streamCopy(ctx context.Context, dsts []chan []byte, src io.Read
|
||||
|
||||
n, err := io.ReadFull(src, buf)
|
||||
if err != nil {
|
||||
return fmt.Errorf("slice mmap fail, %w", err)
|
||||
if !errors.Is(err, io.ErrUnexpectedEOF) && !errors.Is(err, io.EOF) {
|
||||
return fmt.Errorf("slice mmap fail, %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
buf = buf[:n]
|
||||
|
||||
Reference in New Issue
Block a user