pkg/mesh: fix segfault in #36
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit is contained in:
parent
ba00b6c180
commit
409d738124
@ -759,9 +759,8 @@ func (m *Mesh) resolveEndpoints() error {
|
|||||||
if !m.peers[k].Ready() {
|
if !m.peers[k].Ready() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// If the peer is ready, then the endpoint is not nil
|
// Peers may have nil endpoints.
|
||||||
// but it may not have a DNS name.
|
if m.peers[k].Endpoint == nil || m.peers[k].Endpoint.DNS == "" {
|
||||||
if m.peers[k].Endpoint.DNS == "" {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err := resolveEndpoint(m.peers[k].Endpoint); err != nil {
|
if err := resolveEndpoint(m.peers[k].Endpoint); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user