Skip to content

Commit 15a7090

Browse files
committed
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).
1 parent 0099831 commit 15a7090

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

shairport.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,12 +1570,16 @@ const char *pid_file_proc(void) {
15701570
#endif
15711571

15721572
void exit_rtsp_listener() {
1573-
pthread_cancel(rtsp_listener_thread);
1574-
pthread_join(rtsp_listener_thread, NULL); // not sure you need this
1573+
debug(3, "exit_rtsp_listener begins");
1574+
if (type_of_exit_cleanup != TOE_emergency) {
1575+
pthread_cancel(rtsp_listener_thread);
1576+
pthread_join(rtsp_listener_thread, NULL); // not sure you need this
1577+
}
1578+
debug(3, "exit_rtsp_listener ends");
15751579
}
15761580

15771581
void exit_function() {
1578-
1582+
debug(3, "exit_function begins");
15791583
if (type_of_exit_cleanup != TOE_emergency) {
15801584
// the following is to ensure that if libdaemon has been included
15811585
// that most of this code will be skipped when the parent process is exiting
@@ -2040,7 +2044,7 @@ int main(int argc, char **argv) {
20402044
1; // by default, log the file and line of the originating message
20412045
config.debugger_show_relative_time =
20422046
1; // by default, log the time back to the previous debug message
2043-
config.timeout = 60; // wait this number of seconds to wait for a dropped RTSP connection to come back before declaring it lost.
2047+
config.timeout = 120; // wait this number of seconds to wait for a dropped RTSP connection to come back before declaring it lost.
20442048
config.buffer_start_fill = 220;
20452049

20462050
config.resync_threshold = 0.050; // default

0 commit comments

Comments
 (0)