send retransmission in the right order

fixes #62
This commit is contained in:
Marten Seemann
2016-05-08 23:03:40 +07:00
parent 833475a2ed
commit dbcf5b8cce
3 changed files with 10 additions and 8 deletions

View File

@@ -333,7 +333,7 @@ func (s *Session) sendPacket() error {
// TODO: handle multiple packets retransmissions
retransmitPacket := s.sentPacketHandler.DequeuePacketForRetransmission()
if retransmitPacket != nil {
utils.Debugf("\tQueueing retransmission for packet 0x%x", retransmitPacket.PacketNumber)
utils.Debugf("\tDequeueing retransmission for packet 0x%x", retransmitPacket.PacketNumber)
s.stopWaitingManager.RegisterPacketForRetransmission(retransmitPacket)
// resend the frames that were in the packet
controlFrames = append(controlFrames, retransmitPacket.GetControlFramesForRetransmission()...)