From 9e194d5dc88048302fdedae200a2f3cba049b2c5 Mon Sep 17 00:00:00 2001 From: n1xx1 Date: Fri, 18 Oct 2024 14:51:19 +0200 Subject: [PATCH] fix runtime panic (#335) --- server/docker_swarm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/docker_swarm.go b/server/docker_swarm.go index c5b1764..e056e66 100644 --- a/server/docker_swarm.go +++ b/server/docker_swarm.go @@ -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 {