mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 00:15:51 +00:00
Fix DeadlineTimer, callback while holding lock
This commit is contained in:
@@ -119,8 +119,10 @@ public:
|
|||||||
timer->m_isActive = false;
|
timer->m_isActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listener will be called later and we will
|
timer->m_listener->onDeadlineTimer (*timer);
|
||||||
// go through the loop again without waiting.
|
|
||||||
|
// re-loop
|
||||||
|
seconds = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -138,11 +140,7 @@ public:
|
|||||||
|
|
||||||
// Note that we have released the lock here.
|
// Note that we have released the lock here.
|
||||||
|
|
||||||
if (timer != nullptr)
|
if (seconds > 0)
|
||||||
{
|
|
||||||
timer->m_listener->onDeadlineTimer (*timer);
|
|
||||||
}
|
|
||||||
else if (seconds > 0)
|
|
||||||
{
|
{
|
||||||
// Wait until interrupt or next timer.
|
// Wait until interrupt or next timer.
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user