lib/connections: Silence "connected to myself" messages. (#7500)
This commit is contained in:
@@ -244,7 +244,7 @@ func (s *service) handle(ctx context.Context) error {
|
|||||||
// though, especially in the presence of NAT hairpinning, multiple
|
// though, especially in the presence of NAT hairpinning, multiple
|
||||||
// clients between the same NAT gateway, and global discovery.
|
// clients between the same NAT gateway, and global discovery.
|
||||||
if remoteID == s.myID {
|
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()
|
c.Close()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -1023,7 +1023,7 @@ func (s *service) validateIdentity(c internalConn, expectedID protocol.DeviceID)
|
|||||||
// though, especially in the presence of NAT hairpinning, multiple
|
// though, especially in the presence of NAT hairpinning, multiple
|
||||||
// clients between the same NAT gateway, and global discovery.
|
// clients between the same NAT gateway, and global discovery.
|
||||||
if remoteID == s.myID {
|
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()
|
c.Close()
|
||||||
return errors.New("connected to self")
|
return errors.New("connected to self")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user