forked from quic-go/quic-go
http3: immediately close all connections on Server.Close (#4689)
* http3: immediately close all connections on Server.Close * http3: document connection closing when using ServeQUICConn
This commit is contained in:
@@ -1068,4 +1068,17 @@ var _ = Describe("HTTP tests", func() {
|
||||
"Unannounced": {"Surprise!"},
|
||||
})))
|
||||
})
|
||||
|
||||
It("aborts requests on shutdown", func() {
|
||||
mux.HandleFunc("/shutdown", func(w http.ResponseWriter, r *http.Request) {
|
||||
defer GinkgoRecover()
|
||||
Expect(server.Close()).To(Succeed())
|
||||
})
|
||||
|
||||
_, err := client.Get(fmt.Sprintf("https://localhost:%d/shutdown", port))
|
||||
Expect(err).To(HaveOccurred())
|
||||
var appErr *http3.Error
|
||||
Expect(errors.As(err, &appErr)).To(BeTrue())
|
||||
Expect(appErr.ErrorCode).To(Equal(http3.ErrCodeNoError))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user