Skip to content

Commit

Permalink
Fix SessionManager::Shutdown to actually shut-down sessions (#20487)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrjerryjohns authored and pull[bot] committed Jul 14, 2022
1 parent f23dbc3 commit fda526f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/transport/SessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fda526f

Please sign in to comment.