forked from quic-go/quic-go
add a function to close the packet handler map
Close will close the underlying connection and wait until listen has returned. While not strictly necessary in production use, this will fix a few race conditions in our tests.
This commit is contained in:
@@ -271,7 +271,7 @@ func (c *client) establishSecureConnection(ctx context.Context) error {
|
||||
go func() {
|
||||
err := c.session.run() // returns as soon as the session is closed
|
||||
if err != errCloseForRecreating && c.createdPacketConn {
|
||||
c.conn.Close()
|
||||
c.packetHandlers.Close()
|
||||
}
|
||||
errorChan <- err
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user