Jelajahi Sumber

Merge pull request #2901 from xiang90/fix_urlpick

rafthttp: move mu to the top in urlPicker struct
Xiang Li 10 tahun lalu
induk
melakukan
2b5f417113
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      rafthttp/urlpick.go

+ 1 - 1
rafthttp/urlpick.go

@@ -22,8 +22,8 @@ import (
 )
 )
 
 
 type urlPicker struct {
 type urlPicker struct {
+	mu     sync.Mutex // guards urls and picked
 	urls   types.URLs
 	urls   types.URLs
-	mu     sync.Mutex
 	picked int
 	picked int
 }
 }