diff options
author | Max Kellermann <max@duempel.org> | 2014-06-17 00:52:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-17 02:32:17 +0200 |
commit | 8b84e5b3f975e4ad692b7cdcb1b7212b41f25cf1 (patch) | |
tree | 4800ec5056d5109a31a5c0c6682c92bf8aa59d7e /src/input/AsyncInputStream.cxx | |
parent | e1d5ddb478cf8787f6472f14c0889af49b657c79 (diff) | |
download | mpd-8b84e5b3f975e4ad692b7cdcb1b7212b41f25cf1.tar.gz mpd-8b84e5b3f975e4ad692b7cdcb1b7212b41f25cf1.tar.xz mpd-8b84e5b3f975e4ad692b7cdcb1b7212b41f25cf1.zip |
input/curl: hold mutex while writing to postponed_error
Diffstat (limited to '')
-rw-r--r-- | src/input/AsyncInputStream.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index 169a9e8e4..f2e0320c4 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -63,6 +63,16 @@ AsyncInputStream::Pause() paused = true; } +void +AsyncInputStream::PostponeError(Error &&error) +{ + assert(io_thread_inside()); + + seek_state = SeekState::NONE; + postponed_error = std::move(error); + cond.broadcast(); +} + inline void AsyncInputStream::Resume() { |