# HG changeset patch # User Sergey Kandaurov # Date 1674135496 -14400 # Node ID 90a310f3cee674fc2af1c4536cb3b22f77283ea6 # Parent 905b1704eb5491e31e73912b0441762bf34ad861 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. diff -r 905b1704eb54 -r 90a310f3cee6 lib/Test/Nginx/HTTP3.pm --- 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();