aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/curl_input_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-26 19:28:09 +0200
committerMax Kellermann <max@duempel.org>2011-08-26 19:28:09 +0200
commit11626e48bfb1dbf265e7eba3777c77d5ab6bd72b (patch)
tree13d5667e3fc4c7079f37d1ddbb63615fe4317c5a /src/input/curl_input_plugin.c
parentb3df4dc2c92d27034eaf9cef52e97a6e39c77d2e (diff)
downloadmpd-11626e48bfb1dbf265e7eba3777c77d5ab6bd72b.tar.gz
mpd-11626e48bfb1dbf265e7eba3777c77d5ab6bd72b.tar.xz
mpd-11626e48bfb1dbf265e7eba3777c77d5ab6bd72b.zip
input/curl: implement a hard-coded timeout of 10 seconds
Be sure to stop the operation at some point when the server isn't responding.
Diffstat (limited to 'src/input/curl_input_plugin.c')
-rw-r--r--src/input/curl_input_plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c
index d6424c2c6..2c4ac2ff8 100644
--- a/src/input/curl_input_plugin.c
+++ b/src/input/curl_input_plugin.c
@@ -680,6 +680,9 @@ input_curl_easy_init(struct input_curl *c, GError **error_r)
curl_easy_setopt(c->easy, CURLOPT_MAXREDIRS, 5);
curl_easy_setopt(c->easy, CURLOPT_FAILONERROR, true);
curl_easy_setopt(c->easy, CURLOPT_ERRORBUFFER, c->error);
+ curl_easy_setopt(c->easy, CURLOPT_NOPROGRESS, 1l);
+ curl_easy_setopt(c->easy, CURLOPT_NOSIGNAL, 1l);
+ curl_easy_setopt(c->easy, CURLOPT_CONNECTTIMEOUT, 10l);
if (proxy != NULL)
curl_easy_setopt(c->easy, CURLOPT_PROXY, proxy);