mirror of
https://github.com/itzg/mc-router.git
synced 2024-11-21 11:25:41 +01:00
fix runtime panic (#335)
This commit is contained in:
parent
8ab6e4875c
commit
9e194d5dc8
@ -160,7 +160,7 @@ func (w *dockerSwarmWatcherImpl) listServices(ctx context.Context) ([]*routableS
|
||||
|
||||
var result []*routableService
|
||||
for _, service := range services {
|
||||
if service.Spec.EndpointSpec.Mode != swarmtypes.ResolutionModeVIP {
|
||||
if service.Spec.EndpointSpec == nil || service.Spec.EndpointSpec.Mode != swarmtypes.ResolutionModeVIP {
|
||||
continue
|
||||
}
|
||||
if len(service.Endpoint.VirtualIPs) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user