From 5fecc3b92413a92abe9eb2772b41171156bb8233 Mon Sep 17 00:00:00 2001 From: 8lecramm <89603217+8lecramm@users.noreply.github.com> Date: Sat, 28 May 2022 13:11:49 +0200 Subject: [PATCH] Add client_list_mutex --- proxy/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy/server.go b/proxy/server.go index 6ab4100..5ed3d89 100644 --- a/proxy/server.go +++ b/proxy/server.go @@ -100,6 +100,9 @@ func CountMiners() int { func SendTemplateToNodes(input []byte) { var data []byte + client_list_mutex.Lock() + defer client_list_mutex.Unlock() + for rk, rv := range client_list { if client_list == nil {