From 79d7cce34b1bd2cdbfe029889083f94d5a95e4c6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 27 May 2023 14:31:17 +0800 Subject: [PATCH] 1 --- server/robotserver/coroutine.cc | 2 +- server/robotserver/coroutine.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/robotserver/coroutine.cc b/server/robotserver/coroutine.cc index d7778bfc..06be912f 100644 --- a/server/robotserver/coroutine.cc +++ b/server/robotserver/coroutine.cc @@ -128,7 +128,7 @@ void TimerPromise::DoAwait() f8::Timer::Instance()->SetTimeout ( time_, - [this, self = shared_from_this()] (int event, const a8::Args* args) mutable + [this, _self = shared_from_this()] (int event, const a8::Args* args) mutable { if (event == a8::TIMER_EXEC_EVENT) { done_ = true; diff --git a/server/robotserver/coroutine.h b/server/robotserver/coroutine.h index 91ad5b6b..4d9ba029 100644 --- a/server/robotserver/coroutine.h +++ b/server/robotserver/coroutine.h @@ -21,6 +21,7 @@ namespace a8 class Awaiter : public std::enable_shared_from_this { public: + virtual ~Awaiter() {}; std::shared_ptr GetResult() {