Skip to content

Commit 0c7ce97

Browse files
committed
help on timeout
1 parent 728a242 commit 0c7ce97

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Controller.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ def read_settings(self):
6565
def handle_message(self, message):
6666
if message[ServerConstants.KEY_NAME] == ServerConstants.MESSAGE_TYPE_INIT:
6767
self.world._handle_init_message(message)
68-
threading.Thread(target=self.launch_on_thread(self.client.preprocess, 'init', self.world, [])).start()
68+
threading.Thread(target=self.launch_on_thread, args=(self.client.preprocess, 'init', self.world, [])).start()
6969
elif message[ServerConstants.KEY_NAME] == ServerConstants.MESSAGE_TYPE_PICK:
7070
new_world = World(world=self.world)
7171
new_world._handle_pick_message(message)
72-
threading.Thread(target=self.launch_on_thread(self.client.pick, 'pick', new_world,
73-
[new_world.current_turn])).start()
72+
threading.Thread(target=self.launch_on_thread, args=(self.client.pick, 'pick', new_world,
73+
[new_world.current_turn])).start()
7474
elif message[ServerConstants.KEY_NAME] == ServerConstants.MESSAGE_TYPE_TURN:
7575
new_world = World(world=self.world)
7676
new_world._handle_turn_message(message)
7777
if new_world.current_phase == Phase.MOVE:
78-
threading.Thread(target=self.launch_on_thread(self.client.move, 'move', new_world,
78+
threading.Thread(target=self.launch_on_thread, args=(self.client.move, 'move', new_world,
7979
[new_world.current_turn,
8080
new_world.move_phase_num])).start()
8181
elif new_world.current_phase == Phase.ACTION:
82-
threading.Thread(target=self.launch_on_thread(self.client.action, 'action', new_world,
82+
threading.Thread(target=self.launch_on_thread, args=(self.client.action, 'action', new_world,
8383
[new_world.current_turn])).start()
8484
elif message[ServerConstants.KEY_NAME] == ServerConstants.MESSAGE_TYPE_SHUTDOWN:
8585
self.terminate()

0 commit comments

Comments
 (0)