forked from quic-go/quic-go
immediately remove sessions that were closed remotely
We only need to keep sessions that were closed locally, in order to retransmit the CONNECTION_CLOSE packet. For sessions that were closed by the peer, we don't need to wait for any more packets, and there's also no CONNECTION_CLOSE to retransmit. The same applies for sessions that were destroyed when receiving a Version Negotiation or a Retry packet.
This commit is contained in:
@@ -326,7 +326,7 @@ var _ = Describe("Session", func() {
|
||||
It("handles CONNECTION_CLOSE frames", func() {
|
||||
testErr := qerr.Error(qerr.ProofInvalid, "foobar")
|
||||
streamManager.EXPECT().CloseWithError(testErr)
|
||||
sessionRunner.EXPECT().retireConnectionID(gomock.Any())
|
||||
sessionRunner.EXPECT().removeConnectionID(gomock.Any())
|
||||
cryptoSetup.EXPECT().Close()
|
||||
|
||||
go func() {
|
||||
@@ -402,7 +402,7 @@ var _ = Describe("Session", func() {
|
||||
|
||||
It("closes the session in order to replace it with another QUIC version", func() {
|
||||
streamManager.EXPECT().CloseWithError(gomock.Any())
|
||||
sessionRunner.EXPECT().retireConnectionID(gomock.Any())
|
||||
sessionRunner.EXPECT().removeConnectionID(gomock.Any())
|
||||
cryptoSetup.EXPECT().Close()
|
||||
sess.destroy(errCloseSessionForNewVersion)
|
||||
Eventually(areSessionsRunning).Should(BeFalse())
|
||||
|
||||
Reference in New Issue
Block a user