packer/rpc: fix data race in MuxConn

This commit is contained in:
Mitchell Hashimoto
2013-12-10 17:09:17 -08:00
parent 10c90e6513
commit dd50e9d535
+2
View File
@@ -241,7 +241,9 @@ func (m *MuxConn) loop() {
m.mu.Lock()
defer m.mu.Unlock()
for _, w := range m.streams {
w.mu.Lock()
w.remoteClose()
w.mu.Unlock()
}
}()