diff --git a/asio/include/asio/awaitable.hpp b/asio/include/asio/awaitable.hpp index 2ca01e42e3..9bc5a5960b 100644 --- a/asio/include/asio/awaitable.hpp +++ b/asio/include/asio/awaitable.hpp @@ -80,7 +80,11 @@ class ASIO_NODISCARD awaitable awaitable& operator=(awaitable&& other) noexcept { if (this != &other) + { + if (frame_) + frame_->destroy(); frame_ = std::exchange(other.frame_, nullptr); + } return *this; }