lib/connections: Fix LAN addresses begin advertised even when disabled (fixes #7035) (#7045)

This commit is contained in:
Audrius Butkevicius 2020-10-21 08:16:44 +01:00 committed by GitHub
parent 27c91c57d5
commit a17a8cd48b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ func (t *quicListener) URI() *url.URL {
} }
func (t *quicListener) WANAddresses() []*url.URL { func (t *quicListener) WANAddresses() []*url.URL {
uris := t.LANAddresses() uris := []*url.URL{t.uri}
t.mut.Lock() t.mut.Lock()
if t.address != nil { if t.address != nil {
uris = append(uris, t.address) uris = append(uris, t.address)

View File

@ -146,7 +146,7 @@ func (t *tcpListener) URI() *url.URL {
} }
func (t *tcpListener) WANAddresses() []*url.URL { func (t *tcpListener) WANAddresses() []*url.URL {
uris := t.LANAddresses() uris := []*url.URL{t.uri}
t.mut.RLock() t.mut.RLock()
if t.mapping != nil { if t.mapping != nil {
addrs := t.mapping.ExternalAddresses() addrs := t.mapping.ExternalAddresses()