[android] Fix hang when calling Timer::start() twice
Calling start() from the callback was making the timer effectively stop.
This commit is contained in:
@@ -29,7 +29,6 @@ public:
|
||||
}
|
||||
|
||||
void stop() {
|
||||
task = nullptr;
|
||||
loop->removeRunnable(this);
|
||||
}
|
||||
|
||||
@@ -47,8 +46,8 @@ public:
|
||||
}
|
||||
|
||||
void runTask() override {
|
||||
task();
|
||||
reschedule();
|
||||
task();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user