Skip to content

Commit

Permalink
fix node crash if no client hello received
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Dec 1, 2021
1 parent de5a3ff commit f505f7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/quic/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2084,9 +2084,9 @@ void Session::SelectPreferredAddress(
bool Session::SendConnectionClose() {
CHECK(!NgCallbackScope::InNgCallbackScope(this));

// Do not send any frames at all if we're in the draining period
// or in the middle of a silent close
if (is_in_draining_period() || state_->silent_close)
// Do not send any frames at all if we're in the draining period,
// in the middle of a silent close or already destroyed.
if (is_in_draining_period() || state_->silent_close || is_destroyed())
return true;

// The specific handling of connection close varies for client
Expand Down

0 comments on commit f505f7a

Please sign in to comment.