ignore reordered packets for remote closed sessions

This commit is contained in:
Marten Seemann 2019-09-01 14:11:44 +07:00
parent 22b12f199e
commit b8c5ed2a14
3 changed files with 30 additions and 4 deletions

View file

@ -954,7 +954,7 @@ func (s *session) closeForRecreating() protocol.PacketNumber {
func (s *session) closeRemote(e error) {
s.closeOnce.Do(func() {
s.logger.Errorf("Peer closed session with error: %s", e)
s.sessionRunner.Remove(s.srcConnID)
s.sessionRunner.ReplaceWithClosed(s.srcConnID, newClosedRemoteSession(s.perspective))
s.closeChan <- closeError{err: e, remote: true}
})
}