packer/rpc: write only the remaining data on muxconn retry

pull/919/head
Mitchell Hashimoto 13 years ago
parent 84541c670b
commit e6fb71d14f

@ -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)

Loading…
Cancel
Save