mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
Connection notices are informational
This commit is contained in:
parent
db3e3ade80
commit
68750211ef
@ -703,6 +703,9 @@ next:
|
|||||||
wr = &limitedWriter{conn, rateBucket}
|
wr = &limitedWriter{conn, rateBucket}
|
||||||
}
|
}
|
||||||
protoConn := protocol.NewConnection(remoteID, conn, wr, m)
|
protoConn := protocol.NewConnection(remoteID, conn, wr, m)
|
||||||
|
|
||||||
|
l.Infof("Connection to %s established at %v", remoteID, conn.RemoteAddr())
|
||||||
|
|
||||||
m.AddConnection(conn, protoConn)
|
m.AddConnection(conn, protoConn)
|
||||||
continue next
|
continue next
|
||||||
}
|
}
|
||||||
|
@ -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.
|
// Close removes the peer from the model and closes the underlying connection if possible.
|
||||||
// Implements the protocol.Model interface.
|
// Implements the protocol.Model interface.
|
||||||
func (m *Model) Close(node string, err error) {
|
func (m *Model) Close(node string, err error) {
|
||||||
if debug {
|
l.Infof("Connection to %s closed: %v", node, err)
|
||||||
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)
|
|
||||||
}
|
|
||||||
|
|
||||||
cid := m.cm.Get(node)
|
cid := m.cm.Get(node)
|
||||||
m.rmut.RLock()
|
m.rmut.RLock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user