浏览代码

lib/connections: Silence "connected to myself" messages. (#7500)

Audrius Butkevicius 4 年之前
父节点
当前提交
4b02b7e6f1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/connections/service.go

+ 2 - 2
lib/connections/service.go

@@ -244,7 +244,7 @@ func (s *service) handle(ctx context.Context) error {
 		// though, especially in the presence of NAT hairpinning, multiple
 		// clients between the same NAT gateway, and global discovery.
 		if remoteID == s.myID {
-			l.Infof("Connected to myself (%s) at %s - should not happen", remoteID, c)
+			l.Debugf("Connected to myself (%s) at %s", remoteID, c)
 			c.Close()
 			continue
 		}
@@ -1023,7 +1023,7 @@ func (s *service) validateIdentity(c internalConn, expectedID protocol.DeviceID)
 	// though, especially in the presence of NAT hairpinning, multiple
 	// clients between the same NAT gateway, and global discovery.
 	if remoteID == s.myID {
-		l.Infof("Connected to myself (%s) at %s - should not happen", remoteID, c)
+		l.Debugf("Connected to myself (%s) at %s", remoteID, c)
 		c.Close()
 		return errors.New("connected to self")
 	}