mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-04 17:26:49 +00:00
fix: Improve Repeat implementation (#1775)
This commit is contained in:
@@ -27,12 +27,16 @@ Repeat::Repeat(boost::asio::io_context& ioc) : timer_(ioc)
|
||||
{
|
||||
}
|
||||
|
||||
Repeat::~Repeat()
|
||||
{
|
||||
*stopped_ = true;
|
||||
}
|
||||
|
||||
void
|
||||
Repeat::stop()
|
||||
{
|
||||
stopping_ = true;
|
||||
*stopped_ = true;
|
||||
timer_.cancel();
|
||||
semaphore_.acquire();
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
|
||||
Reference in New Issue
Block a user