Message ID | 1370499959-8916-14-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block/curl.c b/block/curl.c index 50c7188..5d91a05 100644 --- a/block/curl.c +++ b/block/curl.c @@ -332,7 +332,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) goto out; } curl_easy_setopt(state->curl, CURLOPT_URL, s->url); - curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 5); + curl_easy_setopt(state->curl, CURLOPT_TIMEOUT, 30); curl_easy_setopt(state->curl, CURLOPT_WRITEFUNCTION, (void *)curl_read_cb); curl_easy_setopt(state->curl, CURLOPT_WRITEDATA, (void *)state); curl_easy_setopt(state->curl, CURLOPT_PRIVATE, (void *)state);
On curl request timeout, guest gets -EIO. This happens too frequently accessing a slow network resource, with 5 seconds timeout. Change it to 30 seconds to give more time before aborting the request. Reported-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)