From 356e872adb6c76ab83d4bb5c43ffd633ee571d94 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 1 Jan 2014 22:20:03 -0800 Subject: [PATCH] packer/rpc: write only the remaining data on muxconn retry --- packer/rpc/muxconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/rpc/muxconn.go b/packer/rpc/muxconn.go index 3766134472c..17312f367e3 100644 --- a/packer/rpc/muxconn.go +++ b/packer/rpc/muxconn.go @@ -445,7 +445,7 @@ func (m *MuxConn) write(from muxPacketFrom, id uint32, dataType muxPacketType, p n := 0 for n < len(p) { var n2 int - n2, err = m.rwc.Write(p) + n2, err = m.rwc.Write(p[n:]) n += n2 if err != nil { log.Printf("[ERR] %p: Stream %d (%s) write error: %s", m, id, from, err)