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() {