dequeue all 0-RTT packets to the session in one go

This commit is contained in:
Marten Seemann 2021-01-09 13:34:05 +08:00
parent d1c5297c0b
commit 7a301aae3d
3 changed files with 47 additions and 45 deletions

View file

@ -463,13 +463,7 @@ func (s *baseServer) handleInitialImpl(p *receivedPacket, hdr *wire.Header) erro
return nil
}
sess.handlePacket(p)
for {
p := s.zeroRTTQueue.Dequeue(hdr.DestConnectionID)
if p == nil {
break
}
sess.handlePacket(p)
}
s.zeroRTTQueue.DequeueToSession(hdr.DestConnectionID, sess)
return nil
}