diff options
author | Jakob Borg <jakob@nym.se> | 2014-06-23 10:52:09 +0200 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2014-06-23 10:52:09 +0200 |
commit | e6f04ed238fb8664e9f5bbf80387ed2aaca7f1d8 (patch) | |
tree | 343054b027094c1e9cc56476cfd915429cf9c095 | |
parent | a6eb690e31e029e1b2970ff5d790de5acee3ec0d (diff) |
Don't whine about unexpected EOFs
-rw-r--r-- | model/model.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/model/model.go b/model/model.go index e0ca693a54..8771fd1b32 100644 --- a/model/model.go +++ b/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) |