]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Fix a bug that blocked a fatal error exit if the player thread couldn't be terminated...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 30 Jun 2024 08:56:29 +0000 (09:56 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sun, 30 Jun 2024 08:56:29 +0000 (09:56 +0100)
shairport.c

index e36d2cc3cb6c50538ef62b1c1f98c7c975b0098c..1060e0b7d3cef08a0701db9951391b0aca0f8dfb 100644 (file)
@@ -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