Close even if we don't have a connection

This commit is contained in:
Jakob Borg 2014-01-01 08:09:17 -05:00
parent 5b84b72d15
commit 7fdea0dd93
1 changed files with 4 additions and 3 deletions

View File

@ -196,10 +196,11 @@ func (m *Model) Close(node string, err error) {
defer m.Unlock()
conn, ok := m.rawConn[node]
if !ok {
return
if ok {
conn.Close()
} else {
warnln("Close on unknown connection for node", node)
}
conn.Close()
if err != nil {
warnf("Disconnected from node %s: %v", node, err)