Skip to content

Commit 4d6c5d6

Browse files
committed
UPD | 1.0.3 release
1 parent 7c21d35 commit 4d6c5d6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/ManapiTimerPool.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ void manapi::timerpool::stop_(std::shared_ptr<data_t> data, bool evloop) MANAPIH
191191
}
192192
}
193193
else {
194-
manapi_log_trace(manapi::debug::LOG_TRACE_LOW, "timerpool:data->timer is NULL");
194+
manapi_log_trace(manapi::debug::LOG_TRACE_HARD, "timerpool:data->timer is NULL");
195195
}
196196
}
197197
else {
198-
manapi_log_trace(manapi::debug::LOG_TRACE_LOW, "timerpool:data->importants is %d", data->importants);
198+
manapi_log_trace(manapi::debug::LOG_TRACE_HARD, "timerpool:data->importants is %d", data->importants);
199199
}
200200
}
201201

@@ -306,7 +306,11 @@ int64_t manapi::timerpool::calculate_repeat_(const std::shared_ptr<data_t> &data
306306
bool manapi::timerpool::reinit_timer_(const std::shared_ptr<data_t> &data_) MANAPIHTTP_NOEXCEPT {
307307
if (data_->timer) {
308308
auto const delay = calculate_repeat_(data_);
309-
data_->timer->stop();
309+
310+
if (data_->timer->is_active()) {
311+
data_->timer->stop();
312+
}
313+
310314
if (delay >= 0) {
311315
data_->timer->start(delay, 1);
312316
}

0 commit comments

Comments
 (0)