mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
api/client.go: Don't report io.EOF as an error.
This commit is contained in:
parent
daa89cf372
commit
7feee11fad
1 changed files with 6 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
|
@ -45,7 +46,11 @@ func (c *Client) worker(channel Channel, h handler) {
|
|||
for {
|
||||
payload, err := c.reader.Read(channel)
|
||||
if err != nil {
|
||||
c.post(err)
|
||||
// Dont report EOF as an error because it is used
|
||||
// by readers to signal an graceful end of input.
|
||||
if err != io.EOF {
|
||||
c.post(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue