mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
don't close established connections on Listener.Close, when using a Transport (#4072)
* don't close established connections on Listener.Close * only close once
This commit is contained in:
parent
ef800d6f71
commit
dda63b90eb
12 changed files with 136 additions and 151 deletions
|
@ -159,23 +159,6 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
Eventually(func() bool { _, ok := m.Get(connID); return ok }).Should(BeFalse())
|
||||
})
|
||||
|
||||
It("closes the server", func() {
|
||||
m := newPacketHandlerMap(nil, nil, utils.DefaultLogger)
|
||||
for i := 0; i < 10; i++ {
|
||||
conn := NewMockPacketHandler(mockCtrl)
|
||||
if i%2 == 0 {
|
||||
conn.EXPECT().getPerspective().Return(protocol.PerspectiveClient)
|
||||
} else {
|
||||
conn.EXPECT().getPerspective().Return(protocol.PerspectiveServer)
|
||||
conn.EXPECT().shutdown()
|
||||
}
|
||||
b := make([]byte, 12)
|
||||
rand.Read(b)
|
||||
m.Add(protocol.ParseConnectionID(b), conn)
|
||||
}
|
||||
m.CloseServer()
|
||||
})
|
||||
|
||||
It("closes", func() {
|
||||
m := newPacketHandlerMap(nil, nil, utils.DefaultLogger)
|
||||
testErr := errors.New("shutdown")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue