From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 30 Jun 2024 08:56:29 +0000 (+0100) Subject: Fix a bug that blocked a fatal error exit if the player thread couldn't be terminated... X-Git-Tag: 4.3.4~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a7090a5fa3683d254d324d9dd823b74949cb0c;p=thirdparty%2Fshairport-sync.git Fix a bug that blocked a fatal error exit if the player thread couldn't be terminated. Revert the session timeout from one minute back to two minutes (120 seconds). --- diff --git a/shairport.c b/shairport.c index e36d2cc3..1060e0b7 100644 --- a/shairport.c +++ b/shairport.c @@ -1570,12 +1570,16 @@ const char *pid_file_proc(void) { #endif void exit_rtsp_listener() { - pthread_cancel(rtsp_listener_thread); - pthread_join(rtsp_listener_thread, NULL); // not sure you need this + debug(3, "exit_rtsp_listener begins"); + if (type_of_exit_cleanup != TOE_emergency) { + pthread_cancel(rtsp_listener_thread); + pthread_join(rtsp_listener_thread, NULL); // not sure you need this + } + debug(3, "exit_rtsp_listener ends"); } void exit_function() { - + debug(3, "exit_function begins"); if (type_of_exit_cleanup != TOE_emergency) { // the following is to ensure that if libdaemon has been included // that most of this code will be skipped when the parent process is exiting @@ -2040,7 +2044,7 @@ int main(int argc, char **argv) { 1; // by default, log the file and line of the originating message config.debugger_show_relative_time = 1; // by default, log the time back to the previous debug message - config.timeout = 60; // wait this number of seconds to wait for a dropped RTSP connection to come back before declaring it lost. + config.timeout = 120; // wait this number of seconds to wait for a dropped RTSP connection to come back before declaring it lost. config.buffer_start_fill = 220; config.resync_threshold = 0.050; // default