From 7da62b659852c0b30d622f09fe98ed323f29a6d2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 29 Dec 2020 16:23:33 -0300 Subject: Send logout packet in a thread (so it is not blocking). Give a grace time of half second to finish sending any packets before destroying the Player structure. --- game/script.rpy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/script.rpy b/game/script.rpy index 4e26c42..ad0ced0 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -211,7 +211,8 @@ label quit: # If needed, logout try: token=Player["token"] - send_packet_now("logout") + renpy.invoke_in_thread(send_packet_now, "logout") + sdelay(0.5) del Player except: pass -- cgit v1.2.3-70-g09d2