Try to fix issue where adding a lot of torrents at once crashes the

daemon.
This commit is contained in:
Andrew Resch 2008-06-27 05:49:27 +00:00
parent 0b590bfcda
commit e1ceb07567
1 changed files with 3 additions and 0 deletions

View File

@ -352,6 +352,9 @@ class Core(
"""Adds a torrent file to the libtorrent session
This requires the torrents filename and a dump of it's content
"""
gobject.idle_add(self._add_torrent_file, filename, filedump, options)
def _add_torrent_file(self, filename, filedump, options):
# Turn the filedump into a torrent_info
if not isinstance(filedump, str):
filedump = filedump.data