curl: Fix hang reading from slow connections
commitb7079df4100069959f4e9d90d5cb5ba7d4ebbf1a
authorMatthew Booth <mbooth@redhat.com>
Tue, 29 Apr 2014 15:03:32 +0000 (29 16:03 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 30 Apr 2014 14:34:21 +0000 (30 16:34 +0200)
tree7a6b1c015cd4f9f029c7df3b2fdb42eb0c26c7ee
parent1f2cead324436da25c3607f4b957f0198a01fc01
curl: Fix hang reading from slow connections

When receiving a new aio read request, we first look for an existing
transaction whose range will cover the read request by the time it
completes. However, we weren't checking that the existing transaction
was still active. If it had timed out, we were adding the request to a
transaction which would never complete and had already been cancelled,
resulting in a hang.

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>
block/curl.c