only create a single session when two Initials arrive at the same time

This commit is contained in:
Marten Seemann 2019-11-27 09:24:56 +07:00
parent 5a834851a8
commit e65df402dd
7 changed files with 190 additions and 59 deletions

View file

@ -108,7 +108,6 @@ var _ = Describe("Session", func() {
Eventually(areSessionsRunning).Should(BeFalse())
sessionRunner = NewMockSessionRunner(mockCtrl)
sessionRunner.EXPECT().Add(gomock.Any(), gomock.Any()).Times(2)
mconn = newMockConnection()
tokenGenerator, err := handshake.NewTokenGenerator()
Expect(err).ToNot(HaveOccurred())
@ -119,6 +118,7 @@ var _ = Describe("Session", func() {
clientDestConnID,
destConnID,
srcConnID,
[16]byte{},
populateServerConfig(&Config{}),
nil, // tls.Config
tokenGenerator,