aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/hub/hubservice.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-02-24 13:36:44 +0100
committerStefan Boberg <[email protected]>2026-02-24 13:36:44 +0100
commit075bac3ca870a1297e9f62230d56e63aec13a77d (patch)
tree367a820685a829adbab31cd1374b1af2cece4b7e /src/zenserver/hub/hubservice.cpp
parentFix correctness and concurrency bugs found during code review (diff)
downloadzen-075bac3ca870a1297e9f62230d56e63aec13a77d.tar.xz
zen-075bac3ca870a1297e9f62230d56e63aec13a77d.zip
Revert "Fix correctness and concurrency bugs found during code review"
This reverts commit 3c89c486338890ce39ddebe5be4722a09e85701a.
Diffstat (limited to 'src/zenserver/hub/hubservice.cpp')
-rw-r--r--src/zenserver/hub/hubservice.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/zenserver/hub/hubservice.cpp b/src/zenserver/hub/hubservice.cpp
index a00446a75..4d9da3a57 100644
--- a/src/zenserver/hub/hubservice.cpp
+++ b/src/zenserver/hub/hubservice.cpp
@@ -151,7 +151,6 @@ struct StorageServerInstance
inline uint16_t GetBasePort() const { return m_ServerInstance.GetBasePort(); }
private:
- void WakeLocked();
RwLock m_Lock;
std::string m_ModuleId;
std::atomic<bool> m_IsProvisioned{false};
@@ -212,7 +211,7 @@ StorageServerInstance::Provision()
if (m_IsHibernated)
{
- WakeLocked();
+ Wake();
}
else
{
@@ -295,15 +294,10 @@ StorageServerInstance::Hibernate()
void
StorageServerInstance::Wake()
{
- RwLock::ExclusiveLockScope _(m_Lock);
- WakeLocked();
-}
-
-void
-StorageServerInstance::WakeLocked()
-{
// Start server in-place using existing data
+ RwLock::ExclusiveLockScope _(m_Lock);
+
if (!m_IsHibernated)
{
ZEN_WARN("Attempted to wake storage server instance for module '{}' which is not hibernated", m_ModuleId);