From 8d88b150a9f7522c99bb52b060ec1aa4353c09ff Mon Sep 17 00:00:00 2001 From: cidoku Date: Fri, 14 Feb 2025 16:21:07 -0300 Subject: [PATCH] kill music dl thread and clear player list on disconnect --- gameview.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gameview.py b/gameview.py index 7315a08..b609bbd 100644 --- a/gameview.py +++ b/gameview.py @@ -2541,6 +2541,12 @@ class gui(QtGui.QWidget): if audio.handleisactive(self.music): audio.stophandle(self.music) audio.freehandle(self.music) + if self.stream: + del self.stream + + if self.download_thread: + self.download_thread.terminate() # Live dangerously + self.download_thread = None def playDownloadedMusic(self, file_length): # Part of the evil HTTPS music download hack for XP systems @@ -2947,6 +2953,7 @@ class TCP_Thread(QtCore.QThread): color.setHsv(rainbow, 255, 255) while True: if self.parent.disconnectnow: + self.parent.playerList.clear() self.parent.stopMusic() self.parent.tcp.close() self.quit()