diff options
| author | Dan Engelbrecht <[email protected]> | 2026-03-23 14:09:46 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-23 14:09:46 +0100 |
| commit | d336e5937019dbab1924419624faa6ffc776cd7f (patch) | |
| tree | cee312dc86f8404bbd4f987cbcf2f4d96124fc19 /src/zenutil | |
| parent | Unique session/client tracking using HyperLogLog (#884) (diff) | |
| download | zen-d336e5937019dbab1924419624faa6ffc776cd7f.tar.xz zen-d336e5937019dbab1924419624faa6ffc776cd7f.zip | |
add hub instance crash recovery (#885)
* add hub instance crash recovery
Diffstat (limited to 'src/zenutil')
| -rw-r--r-- | src/zenutil/include/zenutil/zenserverprocess.h | 1 | ||||
| -rw-r--r-- | src/zenutil/zenserverprocess.cpp | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/zenutil/include/zenutil/zenserverprocess.h b/src/zenutil/include/zenutil/zenserverprocess.h index daa07a1e1..03d507400 100644 --- a/src/zenutil/include/zenutil/zenserverprocess.h +++ b/src/zenutil/include/zenutil/zenserverprocess.h @@ -135,6 +135,7 @@ struct ZenServerInstance #endif bool IsRunning() const; bool Terminate(); + void ResetDeadProcess(); std::string GetLogOutput() const; inline ServerMode GetServerMode() const { return m_ServerMode; } diff --git a/src/zenutil/zenserverprocess.cpp b/src/zenutil/zenserverprocess.cpp index 3993d6a32..2b27b2d8b 100644 --- a/src/zenutil/zenserverprocess.cpp +++ b/src/zenutil/zenserverprocess.cpp @@ -1445,6 +1445,16 @@ ZenServerInstance::IsRunning() const return m_Process.IsRunning(); } +void +ZenServerInstance::ResetDeadProcess() +{ + if (m_Process.IsValid() && !m_Process.IsRunning()) + { + m_Process.Reset(); + m_ShutdownEvent.reset(); + } +} + std::string ZenServerInstance::GetLogOutput() const { |