v1.8.81: fix update apply — os._exit(0) to kill daemon threads
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
15
gui/app.py
15
gui/app.py
@@ -347,8 +347,7 @@ class App(ctk.CTk):
|
|||||||
|
|
||||||
if event_type == "auto_apply":
|
if event_type == "auto_apply":
|
||||||
# Full-auto mode: apply immediately
|
# Full-auto mode: apply immediately
|
||||||
if self.updater.apply_update(path):
|
self._apply_update(path)
|
||||||
self.destroy()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# Show banner
|
# Show banner
|
||||||
@@ -399,9 +398,19 @@ class App(ctk.CTk):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def _apply_update(self, path: str):
|
def _apply_update(self, path: str):
|
||||||
"""Apply downloaded update."""
|
"""Apply downloaded update — cleanup, launch updater script, force exit."""
|
||||||
|
import os, sys
|
||||||
if self.updater.apply_update(path):
|
if self.updater.apply_update(path):
|
||||||
|
# Full cleanup before exit
|
||||||
|
try:
|
||||||
|
self.session_pool.disconnect_all()
|
||||||
|
self.checker.stop()
|
||||||
|
self.updater.stop()
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
# Force terminate — daemon threads keep process alive otherwise
|
||||||
|
os._exit(0)
|
||||||
|
|
||||||
def _skip_update(self, version: str):
|
def _skip_update(self, version: str):
|
||||||
"""Skip this version."""
|
"""Skip this version."""
|
||||||
|
|||||||
BIN
releases/ServerManager-v1.8.81-win-x64.exe
Normal file
BIN
releases/ServerManager-v1.8.81-win-x64.exe
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
"""Version info for ServerManager."""
|
"""Version info for ServerManager."""
|
||||||
|
|
||||||
__version__ = "1.8.80"
|
__version__ = "1.8.81"
|
||||||
__app_name__ = "ServerManager"
|
__app_name__ = "ServerManager"
|
||||||
__author__ = "aibot777"
|
__author__ = "aibot777"
|
||||||
__description__ = "Desktop GUI for managing remote servers"
|
__description__ = "Desktop GUI for managing remote servers"
|
||||||
|
|||||||
Reference in New Issue
Block a user