Browse Source

Connection notices are informational

Jakob Borg 11 years ago
parent
commit
68750211ef
2 changed files with 4 additions and 10 deletions
  1. 3 0
      cmd/syncthing/main.go
  2. 1 10
      model/model.go

+ 3 - 0
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
 			}

+ 1 - 10
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()