Mercurial > hg > nginx-tests
changeset 1886:90a310f3cee6
Tests: workaround for QUIC routing while reloading nginx.
Datagrams can be routed to a new worker process that lacks the connection
state resulting in a stateless reset. Previously, the QUIC connection was
closed in tests on decryption failure including receiving a stateless reset,
which is not yet detected in HTTP3.pm. The workaround is to ignore packets
that could not be decrypted including a stateless reset. This is enough to
continue receiving packets from the old worker process, such as with GOAWAY.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 19 Jan 2023 17:38:16 +0400 |
parents | 905b1704eb54 |
children | 1023354f3a41 |
files | lib/Test/Nginx/HTTP3.pm |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx/HTTP3.pm Wed Jan 18 16:04:33 2023 +0400 +++ b/lib/Test/Nginx/HTTP3.pm Thu Jan 19 17:38:16 2023 +0400 @@ -1940,6 +1940,7 @@ return @data if $#data; return if scalar @{$self->{frames_in}}; +again: my $txt; if (!length($self->{buf})) { @@ -1955,7 +1956,10 @@ while ($self->{buf}) { ($level, $plaintext, $self->{buf}, $self->{token}) = $self->decrypt_aead($self->{buf}); - return if !defined $plaintext; + if (!defined $plaintext) { + $self->{buf} = ''; + goto again; + } goto retry if $self->{token}; $self->handle_frames(parse_frames($plaintext), $level); @data = $self->parse_stream();