fix close NoneType
@@ -435,6 +435,7 @@ class Env:
port, = struct.unpack('!I', reply)
if port == 0:
if time.time() - start_time > MAX_WAIT:
+ if self.client_socket:
self.client_socket.close()
self.client_socket = None
raise MissionInitException('too long finding mission to join')
