mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 01:01:57 +00:00
fix: snapshot Moonraker connection state and make agent teardown responsive
This commit is contained in:
@@ -219,9 +219,9 @@ public:
|
||||
std::thread([this, finish = std::move(allow_finish_p)] {
|
||||
struct InFlightGuard
|
||||
{
|
||||
std::atomic<int>& counter;
|
||||
~InFlightGuard() { counter.fetch_sub(1, std::memory_order_relaxed); }
|
||||
} guard{filament_fetch_in_flight};
|
||||
MoonrakerPrinterAgent& owner;
|
||||
~InFlightGuard() { owner.release_fetch_slot(); }
|
||||
} guard{*this};
|
||||
|
||||
g_deferred_fetch_running.fetch_add(1, std::memory_order_relaxed);
|
||||
finish->get_future().wait();
|
||||
|
||||
Reference in New Issue
Block a user