diff --git a/NEWS b/NEWS index 788f93d53..1d21a4b98 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ ver 0.24 (not yet released) - add option to disable archive plugins in mpd.conf * input - curl: add "connect_timeout" configuration + - curl: fix busy loop after connection failed * decoder - hybrid_dsd: remove - opus: implement bitrate calculation diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index 9133dada4..2a117b4d6 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -102,9 +102,17 @@ AsyncInputStream::Seek(std::unique_lock &lock, assert(IsReady()); assert(seek_state == SeekState::NONE); - if (new_offset == offset) - /* no-op */ + if (new_offset == offset) { + /* no-op, but if the stream is not open anymore (maybe + because it has failed), nothing can be read, so we + should check for errors here instead of pretending + everything's fine */ + + if (!open) + Check(); + return; + } if (!IsSeekable()) throw std::runtime_error("Not seekable");