summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-05-16 19:10:16 +0200
committerJakob Borg <jakob@nym.se>2014-05-16 19:10:16 +0200
commit09d4b3f71e995ae355951b63607aeec7a94ff3e1 (patch)
tree9e8e4b38ffd5721f4e2f9400e4e021fdce698435 /cmd
parent78f0f2b131a681713de98abdeb81b8726d806617 (diff)
Log connection errors at INFO level (fixes #225)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/syncthing/main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go
index e99a9563f9..ffcbaf0c56 100644
--- a/cmd/syncthing/main.go
+++ b/cmd/syncthing/main.go
@@ -571,20 +571,20 @@ next:
for conn := range conns {
certs := conn.ConnectionState().PeerCertificates
if cl := len(certs); cl != 1 {
- l.Warnf("Got peer certificate list of length %d != 1; protocol error", cl)
+ l.Infof("Got peer certificate list of length %d != 1 from %s; protocol error", cl, conn.RemoteAddr())
conn.Close()
continue
}
remoteID := certID(certs[0].Raw)
if remoteID == myID {
- l.Warnf("Connected to myself (%s) - should not happen", remoteID)
+ l.Infof("Connected to myself (%s) - should not happen", remoteID)
conn.Close()
continue
}
if m.ConnectedTo(remoteID) {
- l.Warnf("Connected to already connected node (%s)", remoteID)
+ l.Infof("Connected to already connected node (%s)", remoteID)
conn.Close()
continue
}
@@ -600,6 +600,8 @@ next:
continue next
}
}
+
+ l.Infof("Connection from %s with unknown node ID %s; ignoring", conn.RemoteAddr(), remoteID)
conn.Close()
}
}