Don't whine about unexpected EOFs

This commit is contained in:
Jakob Borg 2014-06-23 10:52:09 +02:00
parent a6eb690e31
commit e6f04ed238
1 changed files with 4 additions and 3 deletions

View File

@ -370,10 +370,11 @@ func (m *Model) Close(node string, err error) {
l.Debugf("%s: %v", node, err)
}
if err != io.EOF {
l.Warnf("Connection to %s closed: %v", node, err)
} else if _, ok := err.(ClusterConfigMismatch); ok {
// EOFs (disconnect) are usually nothing to worry about
if err != io.EOF && err != io.ErrUnexpectedEOF {
l.Warnf("Connection to %s closed: %v", node, err)
} else if debug {
l.Debugln("Connection to %s closed: %v", node, err)
}
cid := m.cm.Get(node)