diff --git a/src/server.h b/src/server.h index 9351edf..b4d7ea3 100644 --- a/src/server.h +++ b/src/server.h @@ -25,10 +25,7 @@ struct TPromise } T await_resume() { - T r (std::move(*this->promise().Value)); - this->promise().Value.reset(); - this->destroy(); - return r; + return *this->promise().Value; } }; @@ -64,9 +61,7 @@ struct TPromise this->promise().Caller = caller; } - void await_resume() { - this->destroy(); - } + void await_resume() { } }; TTask get_return_object() { return { TTask::from_promise(*this) }; }