diff options
| author | Dan Engelbrecht <[email protected]> | 2023-11-15 11:30:56 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-15 11:30:56 +0100 |
| commit | d02b0720813a62a4f1fe875e6e784843f5c2da46 (patch) | |
| tree | 31768a0f52793b0205f156c0b827f11decc2c479 /src/zenutil/zenserverprocess.cpp | |
| parent | add host name to sentry (#537) (diff) | |
| download | zen-d02b0720813a62a4f1fe875e6e784843f5c2da46.tar.xz zen-d02b0720813a62a4f1fe875e6e784843f5c2da46.zip | |
fix race contdition when signaling shutdown of process and waiting for completion (#539)
Diffstat (limited to 'src/zenutil/zenserverprocess.cpp')
| -rw-r--r-- | src/zenutil/zenserverprocess.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/zenutil/zenserverprocess.cpp b/src/zenutil/zenserverprocess.cpp index 83c6668ba..00736321c 100644 --- a/src/zenutil/zenserverprocess.cpp +++ b/src/zenutil/zenserverprocess.cpp @@ -468,7 +468,14 @@ ZenServerInstance::ZenServerInstance(ZenServerEnvironment& TestEnvironment) : m_ ZenServerInstance::~ZenServerInstance() { - Shutdown(); + try + { + Shutdown(); + } + catch (const std::exception& Err) + { + ZEN_ERROR("Shutting down zenserver instance failed, reason: '{}'", Err.what()); + } } void @@ -491,6 +498,7 @@ ZenServerInstance::Shutdown() else { SignalShutdown(); + ZEN_DEBUG("Waiting for zenserver process {} to shut down", m_Process.Pid()); m_Process.Wait(); m_Process.Reset(); } |