fix deadlock when closing the server and the connection at the same time

This commit is contained in:
Marten Seemann 2020-10-29 17:56:14 +07:00
parent b7652887d2
commit 4c25cea9ec
3 changed files with 6 additions and 1 deletions

View file

@ -251,6 +251,7 @@ var _ = Describe("Packet Handler Map", func() {
})
It("closes all server sessions", func() {
handler.SetServer(NewMockUnknownPacketHandler(mockCtrl))
clientSess := NewMockPacketHandler(mockCtrl)
clientSess.EXPECT().getPerspective().Return(protocol.PerspectiveClient)
serverSess := NewMockPacketHandler(mockCtrl)