@@ -93,6 +93,7 @@ def connect(
9393 rlbot_server_ip = rlbot_server_ip ,
9494 rlbot_server_port = rlbot_server_port or self .rlbot_server_port ,
9595 )
96+ self .rlbot_interface .run (background_thread = True )
9697
9798 def wait_for_first_packet (self ):
9899 while self .packet is None or self .packet .match_info .match_phase in {
@@ -122,7 +123,6 @@ def start_match(
122123 wants_ball_predictions = False ,
123124 close_between_matches = False ,
124125 )
125- self .rlbot_interface .run (background_thread = True )
126126
127127 self .rlbot_interface .start_match (config )
128128
@@ -136,7 +136,7 @@ def start_match(
136136
137137 def disconnect (self ):
138138 """
139- Disconnect from the RLBotServer.
139+ Disconnect from RLBotServer.
140140 Note that the server will continue running as long as Rocket League does.
141141 """
142142 self .rlbot_interface .disconnect ()
@@ -167,8 +167,8 @@ def shut_down(self, use_force_if_necessary: bool = True):
167167
168168 self .logger .info ("Shutting down RLBot..." )
169169
170- # In theory this is all we need for the server to cleanly shut itself down
171170 try :
171+ # In theory this is all we need for the server to cleanly shut itself down
172172 self .rlbot_interface .stop_match (shutdown_server = True )
173173 except BrokenPipeError :
174174 match gateway .find_server_process (self .main_executable_name )[0 ]:
0 commit comments