We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d832e1 commit 1560763Copy full SHA for 1560763
src/ManapiTimerPool.cpp
@@ -293,20 +293,9 @@ int64_t manapi::timerpool::calculate_repeat_(const std::shared_ptr<data_t> &data
293
bool manapi::timerpool::reinit_timer_(const std::shared_ptr<data_t> &data_) MANAPIHTTP_NOEXCEPT {
294
if (data_->timer) {
295
auto const delay = calculate_repeat_(data_);
296
+ data_->timer->stop();
297
if (delay >= 0) {
- if (data_->timer->is_active()) {
298
- data_->timer->repeat(delay);
299
- if (data_->timer->again()) {
300
- manapi_log_error("set the timerpool again failed");
301
- return false;
302
- }
303
304
- else {
305
- data_->timer->start(delay, 1);
306
307
308
309
- data_->timer->stop();
+ data_->timer->start(delay, 1);
310
}
311
312
0 commit comments