From b660ee408ffb03d4c65354f79170a02ab28ea1b2 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 1 Jun 2015 16:40:12 -0700 Subject: [PATCH] rafthttp: move mu to the top in urlPicker struct mutex protects all the fields. --- rafthttp/urlpick.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rafthttp/urlpick.go b/rafthttp/urlpick.go index f03037bf8..584f1c0ad 100644 --- a/rafthttp/urlpick.go +++ b/rafthttp/urlpick.go @@ -22,8 +22,8 @@ import ( ) type urlPicker struct { + mu sync.Mutex // guards urls and picked urls types.URLs - mu sync.Mutex picked int }