diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-29 16:23:33 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-29 16:23:33 -0300 |
commit | 7da62b659852c0b30d622f09fe98ed323f29a6d2 (patch) | |
tree | 63733fc457deb5058c8fd068ab8116cccf7e48e9 /game | |
parent | 855efedd94fd3cdb4d11d919381e357979409e90 (diff) | |
download | client-7da62b659852c0b30d622f09fe98ed323f29a6d2.tar.gz client-7da62b659852c0b30d622f09fe98ed323f29a6d2.tar.bz2 client-7da62b659852c0b30d622f09fe98ed323f29a6d2.tar.xz client-7da62b659852c0b30d622f09fe98ed323f29a6d2.zip |
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.
Diffstat (limited to 'game')
-rw-r--r-- | game/script.rpy | 3 |
1 files changed, 2 insertions, 1 deletions
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 |