diff options
author | Jakob Borg <jakob@nym.se> | 2014-06-23 15:06:20 +0200 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2014-06-23 15:38:37 +0200 |
commit | 68750211ef60684014e187a68698c5339c83cd53 (patch) | |
tree | 1a22791d063f7872113d2952fbef3baf9955782a | |
parent | db3e3ade80069da53ff66567a96d0f85a2fd4748 (diff) |
Connection notices are informational
-rw-r--r-- | cmd/syncthing/main.go | 3 | ||||
-rw-r--r-- | model/model.go | 11 |
2 files changed, 4 insertions, 10 deletions
diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 2feb060f54..0efa8afb12 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -703,6 +703,9 @@ next: wr = &limitedWriter{conn, rateBucket} } protoConn := protocol.NewConnection(remoteID, conn, wr, m) + + l.Infof("Connection to %s established at %v", remoteID, conn.RemoteAddr()) + m.AddConnection(conn, protoConn) continue next } diff --git a/model/model.go b/model/model.go index 315bb5a5a7..7cabbcc9d0 100644 --- a/model/model.go +++ b/model/model.go @@ -366,16 +366,7 @@ func (m *Model) ClusterConfig(nodeID string, config protocol.ClusterConfigMessag // Close removes the peer from the model and closes the underlying connection if possible. // Implements the protocol.Model interface. func (m *Model) Close(node string, err error) { - if debug { - l.Debugf("%s: %v", node, err) - } - - // 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) - } + l.Infof("Connection to %s closed: %v", node, err) cid := m.cm.Get(node) m.rmut.RLock() |