Skip to content

Commit

Permalink
co/Sleep: do not resume continuation if there is none
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Nov 10, 2023
1 parent 842b90c commit 7f61ecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/co/Sleep.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ private:
void TakeValue() const noexcept {}

void OnTimer() noexcept {
continuation.resume();
if (continuation)
continuation.resume();
}
};

Expand Down

0 comments on commit 7f61ecb

Please sign in to comment.