Allow pre-ready heartbeat pings and include local doc updates
This commit is contained in:
@@ -2094,6 +2094,13 @@ class SignalingServer:
|
||||
await self._activate_authenticated_client(client)
|
||||
return
|
||||
|
||||
if isinstance(packet, PingPacket):
|
||||
await self._send(
|
||||
client.websocket,
|
||||
PongPacket(type="pong", clientSentAt=packet.clientSentAt),
|
||||
)
|
||||
return
|
||||
|
||||
if not client.world_ready:
|
||||
PACKET_LOGGER.info("ignoring pre-ready packet id=%s type=%s", client.id, packet.type)
|
||||
return
|
||||
@@ -2332,13 +2339,6 @@ class SignalingServer:
|
||||
)
|
||||
return
|
||||
|
||||
if isinstance(packet, PingPacket):
|
||||
await self._send(
|
||||
client.websocket,
|
||||
PongPacket(type="pong", clientSentAt=packet.clientSentAt),
|
||||
)
|
||||
return
|
||||
|
||||
if isinstance(packet, ItemAddPacket):
|
||||
if not self._client_has_permission(client, "item.create"):
|
||||
await self._send_item_result(client, False, "add", "Not authorized to create items.")
|
||||
|
||||
Reference in New Issue
Block a user