Destroy the awaitable's frame as the result is consumed.
This change works around a gcc 10 bug, where the temporary awaitable object being awaited is not destroyed if the co_await resumes with an exception.
This commit is contained in:
parent
61e62436ea
commit
b956b35379
@ -100,7 +100,7 @@ public:
|
||||
// Support for co_await keyword.
|
||||
T await_resume()
|
||||
{
|
||||
return frame_->get();
|
||||
return awaitable(static_cast<awaitable&&>(*this)).frame_->get();
|
||||
}
|
||||
|
||||
#endif // !defined(GENERATING_DOCUMENTATION)
|
||||
|
Loading…
Reference in New Issue
Block a user