mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Disable logging on static instance destruction.
This avoids possible deadlocks on exit when a logger callback exists.
This commit is contained in:
@@ -43,6 +43,7 @@ DispatcherBase::DispatcherBase(Storage& storage, Notifier& notifier)
|
||||
}
|
||||
|
||||
DispatcherBase::~DispatcherBase() {
|
||||
Logger::GetInstance().SetLogger(nullptr);
|
||||
Stop();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ RpcServer::RpcServer() {
|
||||
}
|
||||
|
||||
RpcServer::~RpcServer() {
|
||||
Logger::GetInstance().SetLogger(nullptr);
|
||||
Stop();
|
||||
m_terminating = true;
|
||||
m_poll_cond.notify_all();
|
||||
|
||||
@@ -29,6 +29,7 @@ Storage::Storage(Notifier& notifier, RpcServer& rpc_server)
|
||||
}
|
||||
|
||||
Storage::~Storage() {
|
||||
Logger::GetInstance().SetLogger(nullptr);
|
||||
m_terminating = true;
|
||||
m_rpc_results_cond.notify_all();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user