Skip to content

Commit e8996f5

Browse files
author
CharmySoft
committed
End the client thread when returns to welcome scene
Fix a bug when returns to the welcome scene the client thread is still running, and this can even cause the player to match with him/her self because the old thread is still running.
1 parent fac3676 commit e8996f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ttt_client_gui.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,9 @@ def __on_return_clicked__(self):
536536
button is clicked."""
537537
# Clear screen
538538
self.__clear_screen();
539+
# Set the client to None so the client thread will stop due to error
540+
self.client.client_socket = None;
541+
self.client = None;
539542
# Switch to the welcome scene
540543
self.pack_forget();
541544
self.welcome_scene.pack();

0 commit comments

Comments
 (0)