Browse Source

Don't whine about unexpected EOFs

Jakob Borg 11 years ago
parent
commit
e6f04ed238
1 changed files with 4 additions and 3 deletions
  1. 4 3
      model/model.go

+ 4 - 3
model/model.go

@@ -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)