diff options
author | Matthew Booth <mbooth@redhat.com> | 2014-04-29 16:03:28 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-04-30 16:34:11 +0200 |
commit | e466183718bfaaf347a3c02499473068a0072114 (patch) | |
tree | 061b67d5f6f667568389c699489c42f377f8046d /block | |
parent | 38bbc0a580f9f10570b1d1b5d3e92f0e6feb2970 (diff) |
curl: Remove erroneous sleep waiting for curl completion
The driver will not start more than a fixed number of curl sessions.
If it needs more, it must wait for the completion of an existing one.
The driver was sleeping, which will prevent the main loop from
running, and therefore the event it's waiting on. It was also directly
calling its internal handler rather than waiting on existing
registered handlers to be called from the main loop.
This change causes it simply to wait for a period of time whilst
allowing the main loop to execute.
Signed-off-by: Matthew Booth <mbooth@redhat.com>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/curl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/curl.c b/block/curl.c index 26c9cac505..50bd05f204 100644 --- a/block/curl.c +++ b/block/curl.c @@ -337,8 +337,7 @@ static CURLState *curl_init_state(BDRVCURLState *s) break; } if (!state) { - g_usleep(100); - curl_multi_do(s); + qemu_aio_wait(); } } while(!state); |