Fix race in ExportStatusWriter
This commit is contained in:
parent
192f4e8f7e
commit
3cc8774eb3
|
@ -40,7 +40,9 @@ func ExportStatusWriter(sw StatusWriter, path string, t testing.TB) (release fun
|
|||
http.HandleFunc(
|
||||
pattern,
|
||||
func(w http.ResponseWriter, r *http.Request) {
|
||||
mu.Lock()
|
||||
sw := sws[pattern]
|
||||
mu.Unlock()
|
||||
if sw == nil {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue