refactor: add available accessor property in PacketClient

This commit is contained in:
pk5ls20 committed 2024-10-14 15:13:44 +08:00
1 parent ef39e7ab01
commit ba9afcaa06
8 files changed
+13 -9

No files matched your search

+1 -1
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();