Skip to content

Commit

Permalink
Fix a bug that blocked a fatal error exit if the player thread couldn…
Browse files Browse the repository at this point in the history
…'t be terminated. Revert the session timeout from one minute back to two minutes (120 seconds).
  • Loading branch information
mikebrady committed Jun 30, 2024
1 parent 0099831 commit 15a7090
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions shairport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 15a7090

Please sign in to comment.