Skip to content

Commit

Permalink
Stops retransmitting when connection is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiraux committed Mar 24, 2019
1 parent e0a5676 commit 5d20fb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agents/recovery_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (a *RecoveryAgent) Run(conn *Connection) {
a.Logger.Printf("Packet %s doesn't contain ACK frames, emptying the corresponding retransmission buffer anyway\n", p.ShortString())
a.retransmissionBuffer[p.PNSpace()] = make(map[PacketNumber]RetransmittableFrames)
}
if p.Contains(ConnectionCloseType) || p.Contains(ApplicationCloseType) {
a.Stop()
}
case *RetryPacket:
a.Logger.Println("Received a Retry packet, emptying Initial retransmit buffer")
a.retransmissionBuffer[PNSpaceInitial] = make(map[PacketNumber]RetransmittableFrames)
Expand Down

0 comments on commit 5d20fb6

Please sign in to comment.