From 3900f758eab674d36275249993eae4fd9544f608 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 5 Jul 2020 18:58:59 +0900 Subject: [PATCH] QUIC needs termination without session --- src/h2load.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/h2load.cc b/src/h2load.cc index a1350578..f749130f 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -838,7 +838,9 @@ void Client::terminate_session() { if (config.is_quic()) { quic.close_requested = true; } - session->terminate(); + if (session) { + session->terminate(); + } // http1 session needs writecb to tear down session. signal_write(); } @@ -1496,7 +1498,7 @@ Worker::~Worker() { void Worker::stop_all_clients() { for (auto client : clients) { - if (client && client->session) { + if (client) { client->terminate_session(); } }