fixed 100% CPU on shutdown

This commit is contained in:
Alon Zakai 2006-12-31 09:38:26 +00:00
parent f229f30eca
commit 4cf4089719
1 changed files with 5 additions and 3 deletions

View File

@ -286,7 +286,9 @@ static PyObject *torrent_init(PyObject *self, PyObject *args)
NDEBUG);
// 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;
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)
{
printf("core: removing torrents...\r\n");
delete M_torrents;
printf("core: shutting down session...\r\n");
delete M_ses; // 100% CPU...
printf("core: removing settings...\r\n");
delete M_settings;
printf("core: removing torrents...\r\n");
delete M_torrents;
Py_DECREF(M_constants);