mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
lib/connections: Silence "connected to myself" messages. (#7500)
This commit is contained in:
parent
fdd823d2cb
commit
4b02b7e6f1
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user