Skip to content

Commit 1560763

Browse files
committed
UPD | 1.0.3
1 parent 7d832e1 commit 1560763

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/ManapiTimerPool.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -293,20 +293,9 @@ int64_t manapi::timerpool::calculate_repeat_(const std::shared_ptr<data_t> &data
293293
bool manapi::timerpool::reinit_timer_(const std::shared_ptr<data_t> &data_) MANAPIHTTP_NOEXCEPT {
294294
if (data_->timer) {
295295
auto const delay = calculate_repeat_(data_);
296+
data_->timer->stop();
296297
if (delay >= 0) {
297-
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-
else {
309-
data_->timer->stop();
298+
data_->timer->start(delay, 1);
310299
}
311300
}
312301

0 commit comments

Comments
 (0)