From b79b9738d11c8412fbbd737401be3126a682e171 Mon Sep 17 00:00:00 2001 From: Mathieu Hinderyckx Date: Fri, 22 May 2020 17:54:23 +0200 Subject: [PATCH] Mutex --- cmd/kubefwd/services/services.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kubefwd/services/services.go b/cmd/kubefwd/services/services.go index 081a5a40..1d98177e 100644 --- a/cmd/kubefwd/services/services.go +++ b/cmd/kubefwd/services/services.go @@ -264,7 +264,7 @@ Try: ClientSet: clientSet, Context: ctx, Namespace: namespace, - NamespaceIPLock: sync.Mutex{}, // For parallelization of ip handout, each namespace has its own a.b.c.* range + NamespaceIPLock: &sync.Mutex{}, // For parallelization of ip handout, each namespace has its own a.b.c.* range ListOptions: listOptions, Hostfile: &fwdport.HostFileWithLock{Hosts: hostFile}, ClientConfig: restConfig, @@ -297,7 +297,7 @@ type FwdServiceOpts struct { ClientSet *kubernetes.Clientset Context string Namespace string - NamespaceIPLock sync.Mutex + NamespaceIPLock *sync.Mutex ListOptions metav1.ListOptions Hostfile *fwdport.HostFileWithLock ClientConfig *restclient.Config