Skip to content

Commit

Permalink
Make the socketthread quit before waiting
Browse files Browse the repository at this point in the history
Occasionally, mythfilldatabase gets hung up on the wait() call being called
via the atexit() hook.  We are trying to exit, so rather than wait for an
uncooperative thread, tell it to quit first.

Related to #7714
  • Loading branch information
Beirdo committed Feb 11, 2011
1 parent 8c33e3f commit a4ba708
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mythtv/libs/libmythbase/mythsocketthread.cpp
Expand Up @@ -58,7 +58,10 @@ void MythSocketThread::ShutdownReadyReadThread(void)

WakeReadyReadThread();

wait(); // waits for thread to exit
if (isRunning()) {
quit(); // make the thread exit
wait(); // waits for thread to exit
}

CloseReadyReadPipe();
}
Expand Down

0 comments on commit a4ba708

Please sign in to comment.