From 1d6741eb05e3447e1e32f5bb2acba82dfa7a6ed4 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Sun, 6 Oct 2013 11:04:01 -0400 Subject: [PATCH] Allocate mutex on stack, spotted by davec. --- sockets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sockets.go b/sockets.go index fffa3d9..cb79ab1 100644 --- a/sockets.go +++ b/sockets.go @@ -82,7 +82,7 @@ func frontendListenerDuplicator() { // Don't want to add or delete a wallet listener while iterating // through each to propigate to every attached wallet. Use a mutex to // prevent this. - mtx := new(sync.Mutex) + var mtx sync.Mutex // Check for listener channels to add or remove from set. go func() {