Fix race on loop variable in TestConcurrentExchanges (#773)

This commit is contained in:
Tom Thorogood 2018-10-04 15:54:09 +09:30 committed by Miek Gieben
parent ba6747e8a9
commit c10ce5142a
1 changed files with 2 additions and 1 deletions

View File

@ -539,8 +539,9 @@ func TestConcurrentExchanges(t *testing.T) {
block := make(chan struct{})
waiting := make(chan struct{})
mm := m // redeclare m so as not to trip the race detector
handler := func(w ResponseWriter, req *Msg) {
r := m.Copy()
r := mm.Copy()
r.SetReply(req)
waiting <- struct{}{}