Files
SoftwareManager/src/utils/general/shutdown.py
T
2026-03-19 20:42:28 +01:00

14 lines
361 B
Python

from network.libtorrent_misc import cleanup_session
from utils.logging.logs import consoleLog
from utils.data.state import state
import os
def closehelper():
state.shutdown_event.set()
try:
cleanup_session()
except Exception as e:
consoleLog(f"Exception while cleaning up LibTorrent Session: {e}")
def force_exit():
os._exit(0)