Skip to content

Commit

Permalink
welp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishura4 committed Aug 15, 2023
1 parent 5434cc1 commit 33de527
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/dpp/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class DPP_EXPORT cluster {
* @param seconds How long to wait for
* @return awaitable<timer> Object that can be co_await-ed to suspend the function for a certain time
*/
awaitable<timer> co_sleep(uint64_t seconds);
[[nodiscard]] awaitable<timer> co_sleep(uint64_t seconds);
#endif

/**
Expand Down
4 changes: 2 additions & 2 deletions src/dpp/cluster/timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ void cluster::tick_timers() {

#ifdef DPP_CORO
awaitable<timer> cluster::co_sleep(uint64_t seconds) {
return {[this, seconds] (auto &&cb) {
start_timer([this, cb](dpp::timer handle) {
return awaitable<timer>{[this, seconds] (auto &&cb) mutable {
start_timer([this, cb] (dpp::timer handle) {
cb(handle);
stop_timer(handle);
}, seconds);
Expand Down

0 comments on commit 33de527

Please sign in to comment.