Failsafe Session - Spurious Client Timeout
Version: 1.14.2
When using the failsafe session, clients are launched, a client watcher is added, and a registration timeout is added in the xfsm_startup_start_properties
function, the timeout is never canceled when the clients register themselves in the xfsm_manager_register_client
function:
This first check fails because it in failsafe mode:
if (previous_id != NULL)
So it drops down to the else
case:
else
{
xfsm_verbose ("No previous_id found.\n");
if (manager->failsafe_mode)
xfsm_verbose ("Plus, we're obviously running in failsafe mode.\n");
if (sms_conn != NULL)
{
/* new sms client */
gchar *client_id = xfsm_generate_client_id (sms_conn);
properties = xfsm_properties_new (client_id, SmsClientHostName (sms_conn));
xfsm_client_set_initial_properties (client, properties);
g_free (client_id);
}
}
Which doesn't use the xfsm_manager_handle_old_client_reregister function, which would have canceled the pending timeout. So, 8 seconds later, the timeout spuriously fires:
TRACE[xfsm-startup.c:734] xfsm_startup_timeout(): Client Id = (null) failed to register in time
TRACE[xfsm-startup.c:750] xfsm_startup_handle_failed_startup(): Client Id = (null) failed to start
TRACE[xfsm-manager.c:377] xfsm_manager_handle_failed_properties(): Client Id (null) exited, removing from session.