Skip to content

Commit

Permalink
Fix SessionManager::Shutdown to actually shut-down sessions
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 committed Jul 8, 2022
1 parent 8ebd7f0 commit 2e07871
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 2e07871

Please sign in to comment.