From c2c2c296589f9b6e679e807cdcafe454da1b066a Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Wed, 14 Mar 2018 13:15:03 +0100 Subject: [PATCH] input/thread: set InputStream::ready after Open() failure Without setting the "ready" flag, the caller will wait in WaitReady() forever, locking up MPD. Closes #252 --- NEWS | 2 ++ src/input/ThreadInputStream.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 670cb3256..1a56cee5b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.20.19 (not yet released) * protocol - validate absolute seek time, reject negative values +* input + - mms: fix lockup bug * macOS: fix crash bug ver 0.20.18 (2018/02/24) diff --git a/src/input/ThreadInputStream.cxx b/src/input/ThreadInputStream.cxx index 88251a70a..a5e5e17d5 100644 --- a/src/input/ThreadInputStream.cxx +++ b/src/input/ThreadInputStream.cxx @@ -68,7 +68,7 @@ ThreadInputStream::ThreadFunc() Open(); } catch (...) { postponed_exception = std::current_exception(); - cond.broadcast(); + SetReady(); return; }