1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-13 12:58:17 +03:00

Fix race condition in MarketPlaceManager when drivers load takes too long

This commit is contained in:
Ruben S. Montero 2017-07-12 17:21:25 +02:00
parent 8257b5b839
commit 917cf4bf04

View File

@ -55,7 +55,8 @@ MarketPlaceManager::MarketPlaceManager(
MadManager(_mads),
timer_period(_timer_period),
monitor_period(_monitor_period),
imagem(0)
imagem(0),
raftm(0)
{
Nebula& nd = Nebula::instance();
@ -192,7 +193,7 @@ void MarketPlaceManager::timer_action(const ActionRequest& ar)
tics = 0;
if ( !raftm->is_leader() && !raftm->is_solo() )
if (raftm == 0 || (!raftm->is_leader() && !raftm->is_solo()))
{
return;
}