Browse Source

- Catch invalid_handle exception in savefastresume data

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
27aff04f11
  1. 2
      src/bittorrent.cpp
  2. 3
      src/reverseresolution.h

2
src/bittorrent.cpp

@ -1124,8 +1124,10 @@ void Bittorrent::saveFastResumeData() {
if (rda) { if (rda) {
--num_resume_data; --num_resume_data;
s->pop_alert(); s->pop_alert();
try {
// Remove torrent from session // Remove torrent from session
s->remove_torrent(rda->handle); s->remove_torrent(rda->handle);
}catch(libtorrent::libtorrent_exception){}
continue; continue;
} }
save_resume_data_alert const* rd = dynamic_cast<save_resume_data_alert const*>(a); save_resume_data_alert const* rd = dynamic_cast<save_resume_data_alert const*>(a);

3
src/reverseresolution.h

@ -56,10 +56,11 @@ public:
~ReverseResolutionST() { ~ReverseResolutionST() {
stopped = true; stopped = true;
if(isRunning()) if(isRunning()) {
resolver.cancel(); resolver.cancel();
wait(); wait();
} }
}
void setIP(boost::asio::ip::tcp::endpoint &_ip) { void setIP(boost::asio::ip::tcp::endpoint &_ip) {
ip = _ip; ip = _ip;

Loading…
Cancel
Save