changed the order of torrent_quit to properly shutdown the session
This commit is contained in:
parent
8f5a4ad319
commit
9dcbbdaadf
|
@ -355,15 +355,14 @@ 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: shutting down session...\r\n");
|
|
||||||
M_settings->stop_tracker_timeout = 5;
|
M_settings->stop_tracker_timeout = 5;
|
||||||
M_ses->set_settings(*M_settings);
|
M_ses->set_settings(*M_settings);
|
||||||
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");
|
printf("core: removing torrents...\r\n");
|
||||||
delete M_torrents;
|
delete M_torrents;
|
||||||
|
printf("core: shutting down session...\r\n");
|
||||||
|
delete M_ses; // 100% CPU...
|
||||||
Py_DECREF(M_constants);
|
Py_DECREF(M_constants);
|
||||||
|
|
||||||
printf("core shut down.\r\n");
|
printf("core shut down.\r\n");
|
||||||
|
|
Loading…
Reference in New Issue