forked from quic-go/quic-go
http3: implement server idle timeout support (#4587)
* http3: implement server idle timeout support This update introduces the ability for an HTTP/3 server to enforce an idle timeout on connections. This timeout will trigger when no new requests are received on a connection, irrespective of any PING frames received at the QUIC level. * fix deadlock when http3 idle timeout is not enabled * fix typo * Switch to a more efficient implementation * Avoid a goroutine * Avoid constent re-adjusting of a timer * Works with hijacked streams * Generalize the idle timeout description * Add an integration test for http server idle timeout * Attempt to fix other tests impacted by the new idle timeout test
This commit is contained in:
@@ -29,6 +29,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveServer,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
b := quicvarint.Append(nil, streamTypeControlStream)
|
||||
b = (&settingsFrame{
|
||||
@@ -62,6 +63,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveServer,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
b := quicvarint.Append(nil, streamTypeControlStream)
|
||||
b = (&settingsFrame{}).Append(b)
|
||||
@@ -104,6 +106,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveClient,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
buf := bytes.NewBuffer(quicvarint.Append(nil, streamType))
|
||||
str := mockquic.NewMockStream(mockCtrl)
|
||||
@@ -133,6 +136,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveClient,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
buf := bytes.NewBuffer(quicvarint.Append(nil, streamType))
|
||||
str1 := mockquic.NewMockStream(mockCtrl)
|
||||
@@ -169,6 +173,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveServer,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
buf := bytes.NewBuffer(quicvarint.Append(nil, 0x1337))
|
||||
str := mockquic.NewMockStream(mockCtrl)
|
||||
@@ -195,6 +200,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveServer,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
b := quicvarint.Append(nil, streamTypeControlStream)
|
||||
b = (&dataFrame{}).Append(b)
|
||||
@@ -226,6 +232,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
protocol.PerspectiveServer,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
b := quicvarint.Append(nil, streamTypeControlStream)
|
||||
b = (&settingsFrame{}).Append(b)
|
||||
@@ -264,6 +271,7 @@ var _ = Describe("Connection", func() {
|
||||
false,
|
||||
pers.Opposite(),
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
buf := bytes.NewBuffer(quicvarint.Append(nil, streamTypePushStream))
|
||||
controlStr := mockquic.NewMockStream(mockCtrl)
|
||||
@@ -294,6 +302,7 @@ var _ = Describe("Connection", func() {
|
||||
true,
|
||||
protocol.PerspectiveClient,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
b := quicvarint.Append(nil, streamTypeControlStream)
|
||||
b = (&settingsFrame{Datagram: true}).Append(b)
|
||||
@@ -333,6 +342,7 @@ var _ = Describe("Connection", func() {
|
||||
true,
|
||||
protocol.PerspectiveClient,
|
||||
nil,
|
||||
0,
|
||||
)
|
||||
b := quicvarint.Append(nil, streamTypeControlStream)
|
||||
b = (&settingsFrame{Datagram: true}).Append(b)
|
||||
|
||||
Reference in New Issue
Block a user