Suppress 'use of closed network connection' error in iowatcher

Signed-off-by: Michal Fojtik <mfojtik@redhat.com>
This commit is contained in:
Michal Fojtik
2015-03-25 11:42:44 +01:00
parent 159a58ddfb
commit 1d496a030e
3 changed files with 55 additions and 21 deletions

View File

@@ -101,7 +101,12 @@ func (sw *StreamWatcher) receive() {
case io.ErrUnexpectedEOF:
glog.V(1).Infof("Unexpected EOF during watch stream event decoding: %v", err)
default:
glog.Errorf("Unable to decode an event from the watch stream: %v", err)
msg := "Unable to decode an event from the watch stream: %v"
if util.IsProbableEOF(err) {
glog.V(5).Infof(msg, err)
} else {
glog.Errorf(msg, err)
}
}
return
}