@@ -542,7 +542,7 @@ struct Session::Impl final : public MemoryRetainer {
542542 remote_address_(config.remote_address),
543543 application_(SelectApplication(session, config_)),
544544 timer_(session_->env (), [this] {
545- auto impl = session_->impl_ ; // we hold a reference to ourself,
545+ auto impl = session_->impl_ ; // we hold a reference to ourself,
546546 // as the reference from session to us may go away
547547 // while we call OnTimeout
548548 session_->OnTimeout ();
@@ -565,15 +565,15 @@ struct Session::Impl final : public MemoryRetainer {
565565 // we hold a reference to ourself,
566566 // as the reference from session to us may go away
567567 // while we destroy streams
568- auto impl = session_->impl_ ;
568+ auto impl = session_->impl_ ;
569569
570570 // Iterate through all of the known streams and close them. The streams
571571 // will remove themselves from the Session as soon as they are closed.
572572 // Note: we create a copy because the streams will remove themselves
573573 // while they are cleaning up which will invalidate the iterator.
574574 StreamsMap streams = streams_;
575575 for (auto & stream : streams) stream.second ->Destroy (last_error_);
576- DCHECK (streams_.empty ()); // do not check our local copy
576+ DCHECK (streams_.empty ()); // do not check our local copy
577577
578578 // Clear the pending streams.
579579 while (!pending_bidi_stream_queue_.IsEmpty ()) {
@@ -1410,7 +1410,8 @@ void Session::Close(CloseMethod method) {
14101410
14111411 // This is done already in the implmentation
14121412 // STAT_RECORD_TIMESTAMP(Stats, closing_at);
1413- // The next line would be prevent, that close of the implementation is executed!
1413+ // The next line would prevent,
1414+ // that close of the implementation is executed!
14141415 // impl_->state_->closing = 1;
14151416
14161417 // With both the DEFAULT and SILENT options, we will proceed to closing
@@ -1459,12 +1460,15 @@ void Session::Close(CloseMethod method) {
14591460}
14601461
14611462void Session::FinishClose () {
1462- if (impl_->state_ ->finish_closing ) return ; // we were already called, avoids calling it twice
1463+ if (impl_->state_ ->finish_closing ) return ;
1464+ // we were already called, avoids calling it twice
14631465 impl_->state_ ->finish_closing = 1 ;
1464- // FinishClose() should be called only after, and as a result of, Close()
1466+ // FinishClose() should be called only after,
1467+ // and as a result of, Close()
14651468 // being called first.
14661469 DCHECK (!is_destroyed ());
1467- // The next line does not make sense, as in the implementation is also checking if closing is not in progress
1470+ // The next line does not make sense, as in the implementation
1471+ // is also checking if closing is not in progress
14681472 // DCHECK(impl_->state_->closing);
14691473
14701474 // If impl_->Close() returns true, then the session can be destroyed
@@ -1479,11 +1483,12 @@ void Session::FinishClose() {
14791483}
14801484
14811485void Session::Destroy () {
1482- // Destroy() should be called only after, and as a result of, Close()
1486+ // Destroy() should be called only after,
1487+ // and as a result of, Close()
14831488 // being called first.
14841489 DCHECK (impl_);
14851490 DCHECK (impl_->state_ ->closing );
1486- Debug (this , " Session destroyed" );
1491+ Debug (this , " Session destroyed" );
14871492 if (qlog_stream_ || keylog_stream_) {
14881493 env ()->SetImmediate (
14891494 [qlog = qlog_stream_, keylog = keylog_stream_](Environment*) {
@@ -2109,7 +2114,8 @@ void Session::RemoveStream(stream_id id) {
21092114 // returns.
21102115 if (impl_->state_ ->closing && impl_->state_ ->graceful_close ) {
21112116 FinishClose ();
2112- // CHECK(is_destroyed()); // this will not work, our this pointer may not be valid anymore!
2117+ // CHECK(is_destroyed());
2118+ // this will not work, our this pointer may not be valid anymore!
21132119 }
21142120}
21152121
0 commit comments