packer/rpc: write only the remaining data on muxconn retry
This commit is contained in:
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…
Reference in New Issue