mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-19 14:54:21 +00:00
try to catch invalid handle in deluge_core
This commit is contained in:
parent
e0367895b7
commit
fd7d1ce675
@ -1787,6 +1787,7 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
|||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
try {
|
||||||
if (M_torrents->at(index).handle.is_valid()){
|
if (M_torrents->at(index).handle.is_valid()){
|
||||||
std::vector<libtorrent::announce_entry> trackerlist;
|
std::vector<libtorrent::announce_entry> trackerlist;
|
||||||
std::istringstream trackers(tracker);
|
std::istringstream trackers(tracker);
|
||||||
@ -1804,6 +1805,8 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
|||||||
M_torrents->at(index).handle.force_reannounce();
|
M_torrents->at(index).handle.force_reannounce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (libtorrent::invalid_handle&) {}
|
||||||
Py_INCREF(Py_None); return Py_None;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
}
|
}
|
||||||
static PyObject *torrent_prioritize_files(PyObject *self, PyObject *args)
|
static PyObject *torrent_prioritize_files(PyObject *self, PyObject *args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user