@@ -1663,10 +1663,8 @@ void QuicSession::AddStream(BaseObjectPtr<QuicStream> stream) {
1663
1663
// not immediately torn down, but is allowed to drain
1664
1664
// properly per the QUIC spec description of "immediate close".
1665
1665
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 ;
1670
1668
set_flag (QUICSESSION_FLAG_CLOSING);
1671
1669
1672
1670
QuicError err = last_error ();
@@ -2368,10 +2366,7 @@ void QuicSession::ResetStream(int64_t stream_id, uint64_t code) {
2368
2366
// notify the JavaScript side and destroy the connection with
2369
2367
// a flag set that indicates stateless reset.
2370
2368
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));
2375
2370
set_flag (QUICSESSION_FLAG_SILENT_CLOSE);
2376
2371
set_flag (QUICSESSION_FLAG_CLOSING);
2377
2372
0 commit comments