mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
try fixing timer again
This commit is contained in:
parent
f8be941bce
commit
c9fe6c374f
1 changed files with 11 additions and 2 deletions
|
@ -47,6 +47,16 @@ namespace llarp
|
|||
id = other.id;
|
||||
}
|
||||
|
||||
timer(timer&& other)
|
||||
{
|
||||
parent = std::move(other.parent);
|
||||
user = std::move(other.user);
|
||||
started = std::move(other.started);
|
||||
timeout = std::move(other.timeout);
|
||||
func = std::move(other.func);
|
||||
id = std::move(other.id);
|
||||
}
|
||||
|
||||
void
|
||||
exec();
|
||||
|
||||
|
@ -96,8 +106,7 @@ struct llarp_timer_context
|
|||
auto itr = timers.find(id);
|
||||
if(itr == timers.end())
|
||||
return;
|
||||
t = std::move(itr->second);
|
||||
timers.erase(itr);
|
||||
t = itr->second;
|
||||
}
|
||||
t.exec();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue