mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 03:55:43 +00:00
fixed 100% CPU on shutdown
This commit is contained in:
parent
f229f30eca
commit
4cf4089719
@ -286,7 +286,9 @@ static PyObject *torrent_init(PyObject *self, PyObject *args)
|
|||||||
NDEBUG);
|
NDEBUG);
|
||||||
|
|
||||||
// Tell Boost that we are on *NIX, so bloody '.'s are ok inside a directory name!
|
// Tell Boost that we are on *NIX, so bloody '.'s are ok inside a directory name!
|
||||||
boost::filesystem::path::default_name_check(empty_name_check);
|
try {
|
||||||
|
boost::filesystem::path::default_name_check(empty_name_check);
|
||||||
|
} catch (boost::filesystem::filesystem_error&) {} // Already been done, if re-initing
|
||||||
|
|
||||||
char *client_ID, *user_agent;
|
char *client_ID, *user_agent;
|
||||||
python_long v1,v2,v3,v4;
|
python_long v1,v2,v3,v4;
|
||||||
@ -336,12 +338,12 @@ static PyObject *torrent_init(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
static PyObject *torrent_quit(PyObject *self, PyObject *args)
|
static PyObject *torrent_quit(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
|
printf("core: removing torrents...\r\n");
|
||||||
|
delete M_torrents;
|
||||||
printf("core: shutting down session...\r\n");
|
printf("core: shutting down session...\r\n");
|
||||||
delete M_ses; // 100% CPU...
|
delete M_ses; // 100% CPU...
|
||||||
printf("core: removing settings...\r\n");
|
printf("core: removing settings...\r\n");
|
||||||
delete M_settings;
|
delete M_settings;
|
||||||
printf("core: removing torrents...\r\n");
|
|
||||||
delete M_torrents;
|
|
||||||
|
|
||||||
Py_DECREF(M_constants);
|
Py_DECREF(M_constants);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user