diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-10-08 19:49:33 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-10-08 19:49:33 +0200 |
| commit | 3368aefd9782b0e22b95c1bcf988fd9b1c10522e (patch) | |
| tree | a1716b161f11b13382e94d3ccdc6ec3701953be5 | |
| parent | d2a09fd84fa75368c820eb443854dcf5f667f970 (diff) | |
Fix bug causing signal changes to be lost (#2870).
It was possible (and I believe it happend) for new signals to be queued
up in _pending while some old ones were being processed. They would
then be cleared at the end of resume() without ever being sent.
| -rw-r--r-- | src/lib/change_signaller.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/change_signaller.h b/src/lib/change_signaller.h index cda366076..0b2c1539d 100644 --- a/src/lib/change_signaller.h +++ b/src/lib/change_signaller.h @@ -87,15 +87,13 @@ public: { boost::mutex::scoped_lock lm(_mutex); auto pending = _pending; + _pending.clear(); + _suspended = false; lm.unlock(); for (auto signal: pending) { signal.thing->signal_change(signal.type, signal.property); } - - lm.lock(); - _pending.clear(); - _suspended = false; } static ChangeSignalDespatcher* instance() |
