mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2025-08-17 08:15:42 +00:00
Fix set udp sock
This commit is contained in:
parent
407127ec97
commit
852e977a75
@ -30,7 +30,8 @@ class UDPServer(asyncio.DatagramTransport):
|
||||
code = data[2:3].decode()
|
||||
|
||||
client = self.Core.get_client(cid=cid)
|
||||
if client and client._udp_sock != (self.transport, addr):
|
||||
if client:
|
||||
if client._udp_sock != (self.transport, addr):
|
||||
client._udp_sock = (self.transport, addr)
|
||||
self.log.debug(f"Set UDP Sock for CID: {cid}")
|
||||
else:
|
||||
@ -42,7 +43,8 @@ class UDPServer(asyncio.DatagramTransport):
|
||||
# TODO: Call event onSentPing
|
||||
self.transport.sendto(b"p", addr) # Send ping
|
||||
case "Z":
|
||||
# TODO: Positions synchronization
|
||||
if client:
|
||||
client._send(data)
|
||||
# TODO: Call event onChangePosition
|
||||
pass
|
||||
case _:
|
||||
|
Loading…
x
Reference in New Issue
Block a user