From 2e0787159d1c98f6af07f70c2be804b42a623949 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Fri, 8 Jul 2022 07:24:07 -0700 Subject: [PATCH] Fix SessionManager::Shutdown to actually shut-down sessions SessionManager::Shutdown() wasn't actually shutting down any sessions that were resident in the session table. This meant that they would only get torn down on program termination, which causes issues in the Python REPL since it results in Log prints being emitted well after we've actually disconnected the logging subsystem. --- src/transport/SessionManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 8842c728b4c08e..2c84097f3f832c 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -111,6 +111,12 @@ void SessionManager::Shutdown() mFabricTable->RemoveFabricDelegate(this); mFabricTable = nullptr; } + + mSecureSessions.ForEachSession([&](auto session) { + session->MarkForEviction(); + return Loop::Continue; + }); + mMessageCounterManager = nullptr; mState = State::kNotReady;