When connections are broken on Watch, write fewer errors to logs
Watch depends on long running connections, which intervening proxies may break without the control of the remote server. Specific errors handled are io.EOF, io.EOF wrapped by *url.Error, http connection reset errors (caused by race conditions in golang http code), and connection reset by peer (simply tolerated).
This commit is contained in:
@@ -70,3 +70,16 @@ func TestFake(t *testing.T) {
|
||||
go sender()
|
||||
consumer(f)
|
||||
}
|
||||
|
||||
func TestEmpty(t *testing.T) {
|
||||
w := NewEmptyWatch()
|
||||
_, ok := <-w.ResultChan()
|
||||
if ok {
|
||||
t.Errorf("unexpected result channel result")
|
||||
}
|
||||
w.Stop()
|
||||
_, ok = <-w.ResultChan()
|
||||
if ok {
|
||||
t.Errorf("unexpected result channel result")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user