Skip to content

Commit

Permalink
Disable discovery inline during destruction
Browse files Browse the repository at this point in the history
Don't dispatch into the IoContext so we are sure that the discovery is actually
being disabled in time.
  • Loading branch information
fgo-ableton committed Jul 2, 2024
1 parent 03376b7 commit 41d9aa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ableton/link/Controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ class Controller
auto stopped = false;

mIo->async([this, &mutex, &condition, &stopped]() {
enable(false);
mEnabled = false;
mDiscovery.enable(false);
std::unique_lock<std::mutex> lock(mutex);
stopped = true;
condition.notify_one();
Expand Down

0 comments on commit 41d9aa1

Please sign in to comment.