refactor: add available accessor property in PacketClient

This commit is contained in:
pk5ls20
2024-10-14 15:13:44 +08:00
parent b4cb3ddf1c
commit a79c933693
8 changed files with 13 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ export class GetRkey extends BaseAction<Payload, Array<any>> {
payloadSchema = SchemaData;
async _handle(payload: Payload) {
if (!this.core.apis.PacketApi.packetClient?.isConnected) {
if (!this.core.apis.PacketApi.packetClient?.available) {
throw new Error('PacketClient is not init');
}
return await this.core.apis.PacketApi.sendRkeyPacket();