mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Stop a crash that can happen during shutdown.
This commit is contained in:
@@ -86,11 +86,13 @@ public:
|
||||
class Instance
|
||||
{
|
||||
protected:
|
||||
static bool running;
|
||||
InstanceType& mType;
|
||||
|
||||
public:
|
||||
Instance(InstanceType& t) : mType(t) { mType.addInstance(); }
|
||||
~Instance() { mType.decInstance(); }
|
||||
~Instance() { if (running) mType.decInstance(); }
|
||||
static void shutdown() { running = false; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user