From 8a24c9b1777986b6124db55dda8a320ef552bc84 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 10 Dec 2013 17:09:17 -0800 Subject: [PATCH] packer/rpc: fix data race in MuxConn --- packer/rpc/muxconn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packer/rpc/muxconn.go b/packer/rpc/muxconn.go index 8ff8b4aec..9201dfaa7 100644 --- a/packer/rpc/muxconn.go +++ b/packer/rpc/muxconn.go @@ -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() } }()