fixed bug in torrent_handle::write_resume_data since the session mutex was removed
This commit is contained in:
@@ -728,6 +728,7 @@ namespace libtorrent
|
|||||||
|
|
||||||
entry ret(entry::dictionary_t);
|
entry ret(entry::dictionary_t);
|
||||||
TORRENT_SYNC_CALL1(write_resume_data, boost::ref(ret));
|
TORRENT_SYNC_CALL1(write_resume_data, boost::ref(ret));
|
||||||
|
t = m_torrent.lock();
|
||||||
if (t)
|
if (t)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
@@ -737,6 +738,7 @@ namespace libtorrent
|
|||||||
ses.m_io_service.post(boost::bind(&fun_wrap, &done, &ses.cond
|
ses.m_io_service.post(boost::bind(&fun_wrap, &done, &ses.cond
|
||||||
, &ses.mut, boost::function<void(void)>(boost::bind(
|
, &ses.mut, boost::function<void(void)>(boost::bind(
|
||||||
&piece_manager::write_resume_data, &t->filesystem(), boost::ref(ret)))));
|
&piece_manager::write_resume_data, &t->filesystem(), boost::ref(ret)))));
|
||||||
|
t.reset();
|
||||||
do { ses.cond.wait(l); } while(!done);
|
do { ses.cond.wait(l); } while(!done);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user