always unlock while waiting for disk-IO
This commit is contained in:
@@ -1783,8 +1783,10 @@ namespace libtorrent
|
|||||||
{
|
{
|
||||||
if (cache_block(j, handler, l) < 0)
|
if (cache_block(j, handler, l) < 0)
|
||||||
{
|
{
|
||||||
|
l.unlock();
|
||||||
file::iovec_t iov = {j.buffer, j.buffer_size};
|
file::iovec_t iov = {j.buffer, j.buffer_size};
|
||||||
ret = j.storage->write_impl(&iov, j.piece, j.offset, 1);
|
ret = j.storage->write_impl(&iov, j.piece, j.offset, 1);
|
||||||
|
l.lock();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
test_error(j);
|
test_error(j);
|
||||||
|
Reference in New Issue
Block a user