From 4729e325e044eb83eba3974d7aaf79a4e204cd3c Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 20 Jul 2022 18:05:07 +0100 Subject: [PATCH] Wait up to 10 seconds for NQPTP to come online at startup. --- shairport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shairport.c b/shairport.c index db89a496..bbecc558 100644 --- a/shairport.c +++ b/shairport.c @@ -2323,12 +2323,12 @@ int main(int argc, char **argv) { ptp_send_control_message_string("T"); // get nqptp to create the named shm interface int ptp_check_times = 0; const int ptp_wait_interval_us = 5000; - // wait for up to two seconds for NQPTP to come online + // wait for up to ten seconds for NQPTP to come online do { ptp_send_control_message_string("T"); // get nqptp to create the named shm interface usleep(ptp_wait_interval_us); ptp_check_times++; - } while ((ptp_shm_interface_open() != 0) && (ptp_check_times < (2000000 / ptp_wait_interval_us))); + } while ((ptp_shm_interface_open() != 0) && (ptp_check_times < (10000000 / ptp_wait_interval_us))); if (ptp_shm_interface_open() != 0) { die("Can't access NQPTP! Is it installed and running?");