forked from quic-go/quic-go
http3: close the connection when closing the roundtripper (#3873)
This commit is contained in:
@@ -239,7 +239,12 @@ func (r *RoundTripper) Close() error {
|
||||
}
|
||||
r.clients = nil
|
||||
if r.transport != nil {
|
||||
r.transport.Close()
|
||||
if err := r.transport.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := r.transport.Conn.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
r.transport = nil
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -98,7 +98,7 @@ var _ = Describe("HTTP3 Server hotswap test", func() {
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
rt.Close()
|
||||
Expect(rt.Close()).NotTo(HaveOccurred())
|
||||
Expect(ln.Close()).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ var _ = Describe("HTTP tests", func() {
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
rt.Close()
|
||||
Expect(rt.Close()).NotTo(HaveOccurred())
|
||||
Expect(server.Close()).NotTo(HaveOccurred())
|
||||
Eventually(stoppedServing).Should(BeClosed())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user