diff options
author | David Robillard <d@drobilla.net> | 2020-11-29 21:49:58 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-29 21:54:42 +0100 |
commit | feba8dd8df394119a041e40a5ac24b2fccb7507b (patch) | |
tree | f72599852b6c8f650b45730f82ea953c4b164a4c /src | |
parent | 66f8b986dfe703ee9f3b3a5b69cb4309fd98e71d (diff) | |
download | patchage-feba8dd8df394119a041e40a5ac24b2fccb7507b.tar.gz patchage-feba8dd8df394119a041e40a5ac24b2fccb7507b.tar.bz2 patchage-feba8dd8df394119a041e40a5ac24b2fccb7507b.zip |
Save myself from trying to "properly" handle Jack shutdown again
JACK is a wonderful idea. Shame about the software, though.
Diffstat (limited to 'src')
-rw-r--r-- | src/JackLibDriver.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/JackLibDriver.cpp b/src/JackLibDriver.cpp index fd66e20..e5d3d23 100644 --- a/src/JackLibDriver.cpp +++ b/src/JackLibDriver.cpp @@ -255,7 +255,6 @@ JackLibDriver::refresh(const EventSink& sink) std::lock_guard<std::mutex> lock{_shutdown_mutex}; if (!_client) { - _emit_event(DriverDetachmentEvent{ClientType::jack}); return; } @@ -473,6 +472,15 @@ JackLibDriver::on_shutdown(void* const driver) { auto* const me = static_cast<JackLibDriver*>(driver); + /* Note that the JACK documentation lies about this situation. It says the + client must not call jack_client_close() here... except that is exactly + what libjack does if a shutdown callback isn't registered. Despite + that, doing so here hangs forever. Handling it "properly" like a signal + handler and calling jack_client_close() in another thread also hangs. + + So, since JACK is a hot mess and it's impossible to gracefully handle + this situation, just leak the client. */ + std::lock_guard<std::mutex> lock{me->_shutdown_mutex}; me->_client = nullptr; |