mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2025-08-17 08:15:42 +00:00
try to check_alive
This commit is contained in:
parent
45d45a820c
commit
31d8cf7842
@ -95,6 +95,7 @@ class Core:
|
||||
|
||||
async def check_alive(self):
|
||||
maxp = config.Game['players']
|
||||
try:
|
||||
while self.run:
|
||||
await asyncio.sleep(1)
|
||||
ca = f"Ss{len(self.clients_by_id)}/{maxp}:{self.get_clients_list()}"
|
||||
@ -105,6 +106,9 @@ class Core:
|
||||
client.is_disconnected()
|
||||
continue
|
||||
await client._send(bytes(ca, "utf-8"))
|
||||
except Exception as e:
|
||||
self.log.error("Error in check_alive.")
|
||||
self.log.exception(e)
|
||||
|
||||
@staticmethod
|
||||
def start_web():
|
||||
|
Loading…
x
Reference in New Issue
Block a user