Skip to content

Commit 99f7c4b

Browse files
committed
quic: possibly resolve flaky assertion failure in ipv6only test
PR-URL: #34033 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent f5343d1 commit 99f7c4b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/quic/node_quic_session.cc

+3-8
Original file line numberDiff line numberDiff line change
@@ -1663,10 +1663,8 @@ void QuicSession::AddStream(BaseObjectPtr<QuicStream> stream) {
16631663
// not immediately torn down, but is allowed to drain
16641664
// properly per the QUIC spec description of "immediate close".
16651665
void QuicSession::ImmediateClose() {
1666-
// Calling either ImmediateClose or SilentClose will cause
1667-
// the QUICSESSION_FLAG_CLOSING to be set. In either case,
1668-
// we should never re-enter ImmediateClose or SilentClose.
1669-
CHECK(!is_flag_set(QUICSESSION_FLAG_CLOSING));
1666+
if (is_flag_set(QUICSESSION_FLAG_CLOSING))
1667+
return;
16701668
set_flag(QUICSESSION_FLAG_CLOSING);
16711669

16721670
QuicError err = last_error();
@@ -2368,10 +2366,7 @@ void QuicSession::ResetStream(int64_t stream_id, uint64_t code) {
23682366
// notify the JavaScript side and destroy the connection with
23692367
// a flag set that indicates stateless reset.
23702368
void QuicSession::SilentClose() {
2371-
// Calling either ImmediateClose or SilentClose will cause
2372-
// the QUICSESSION_FLAG_CLOSING to be set. In either case,
2373-
// we should never re-enter ImmediateClose or SilentClose.
2374-
CHECK(!is_flag_set(QUICSESSION_FLAG_CLOSING));
2369+
CHECK(!is_flag_set(QUICSESSION_FLAG_SILENT_CLOSE));
23752370
set_flag(QUICSESSION_FLAG_SILENT_CLOSE);
23762371
set_flag(QUICSESSION_FLAG_CLOSING);
23772372

0 commit comments

Comments
 (0)