Commit d622c1ee authored by Arnaud de Turckheim's avatar Arnaud de Turckheim

Fix multilive race

Depending on the skew value and announce periodicity, the master
expiration date might be reset all the time. In this case multilive will
never get up.
parent d50d3d06
......@@ -315,9 +315,14 @@ int main( int i_argc, char **pp_argv )
if ( announce_get_priority(p_buffer) < i_priority )
{
/* Do not take over immediately to avoid fighting with
* potential other idle nodes. */
i_master_expiration = i_current_date + i_master_expiration_skew;
if ( i_current_date + i_master_expiration_skew <
i_master_expiration )
{
/* Do not take over immediately to avoid fighting with
* potential other idle nodes. */
i_master_expiration =
i_current_date + i_master_expiration_skew;
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment