Skip to content

Commit

Permalink
packer/rpc: write only the remaining data on muxconn retry
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jan 2, 2014
1 parent b0d7933 commit 356e872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packer/rpc/muxconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 356e872

Please sign in to comment.