exit(status);
}
+/* avoid busy loop if server is down */
+static void set_stat_task_restart_barrier(void)
+{
+ struct timeval delay = {5, 0};
+ tv_add(now, &delay, &stat_task->restart_barrier);
+}
static void client_task_event_handler(__a_unused struct task *t)
{
int i;
- struct timeval delay = {1, 0};
if (t->ret == -E_HANDSHAKE_COMPLETE)
return;
close_stat_pipe();
if (t->ret != -E_SERVER_EOF)
stat_task->clock_diff_count = conf.clock_diff_count_arg;
- /* avoid busy loop if server is down */
- tv_add(now, &delay, &stat_task->restart_barrier);
+ set_stat_task_restart_barrier();
FOR_EACH_AUDIO_FORMAT(i)
afi[i].restart_barrier = stat_task->restart_barrier;
}
int argc = 2;
ret = client_open(argc, argv, &st->pcd);
}
+ set_stat_task_restart_barrier();
if (ret < 0)
return;
st->pcd->task.event_handler = client_task_event_handler;