Commit 8e99016c authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

old/netchan: fix data race on client hashmap

Fixes #2713.

R=golang-dev, r
CC=golang-dev, mpimenov
https://golang.org/cl/5545065
parent 994e0646
......@@ -165,9 +165,11 @@ func (cs *clientSet) sync(timeout time.Duration) error {
deadline := time.Now().Add(timeout)
// seq remembers the clients and their seqNum at point of entry.
seq := make(map[unackedCounter]int64)
cs.mu.Lock()
for client := range cs.clients {
seq[client] = client.seq()
}
cs.mu.Unlock()
for {
pending := false
cs.mu.Lock()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment