ignoring endpoint check when persistent keepalive is not zero

This commit is contained in:
crmendes 2020-02-25 18:02:19 +00:00
parent 12220b790d
commit b800af759a

View File

@ -302,7 +302,7 @@ func (c *Conf) Equal(b *Conf) bool {
if (c.Peers[i].Endpoint == nil) != (b.Peers[i].Endpoint == nil) { if (c.Peers[i].Endpoint == nil) != (b.Peers[i].Endpoint == nil) {
return false return false
} }
if c.Peers[i].Endpoint != nil { if c.Peers[i].Endpoint != nil && c.Peers[i].PersistentKeepalive == 0 {
if c.Peers[i].Endpoint.Port != b.Peers[i].Endpoint.Port { if c.Peers[i].Endpoint.Port != b.Peers[i].Endpoint.Port {
return false return false
} }