Browse Source

Merge pull request #2901 from xiang90/fix_urlpick

rafthttp: move mu to the top in urlPicker struct
Xiang Li 10 years ago
parent
commit
2b5f417113
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rafthttp/urlpick.go

+ 1 - 1
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
 }