diff options
Diffstat (limited to 'pid/pidloop.cpp')
-rw-r--r-- | pid/pidloop.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pid/pidloop.cpp b/pid/pidloop.cpp index f613c7e..9eed3a8 100644 --- a/pid/pidloop.cpp +++ b/pid/pidloop.cpp @@ -57,6 +57,11 @@ void pidControlLoop(PIDZone* zone, boost::asio::steady_timer& timer, bool first, timer.expires_after(std::chrono::milliseconds(100)); timer.async_wait( [zone, &timer, ms100cnt](const boost::system::error_code& ec) mutable { + if (ec == boost::asio::error::operation_aborted) + { + return; // timer being canceled, stop loop + } + /* * This should sleep on the conditional wait for the listen thread * to tell us it's in sync. But then we also need a timeout option |