From c3fc84de121f7caf2262544bf5aba8ee04590e3c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 9 Jan 2017 18:08:33 +0100 Subject: [PATCH] input/curl: wake up client thread after seek to end of file Call SeekDone() to avoid the freeze bug. --- NEWS | 1 + src/input/plugins/CurlInputPlugin.cxx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 773264f7a..afd3e8ce7 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.20.1 (not yet released) * input - curl: fix crash bug + - curl: fix freeze bug * decoder - wavpack: fix crash bug * storage diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index 0789cac3a..b972876a0 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -385,11 +385,13 @@ CurlInputStream::SeekInternal(offset_type new_offset) FreeEasy(); offset = new_offset; - if (offset == size) + if (offset == size) { /* seek to EOF: simulate empty result; avoid triggering a "416 Requested Range Not Satisfiable" response */ + SeekDone(); return; + } InitEasy();