refactor: add available accessor property in PacketClient

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

No files matched your search

+1 -1
View File
@@ -377,7 +377,7 @@ export class NTQQFileApi {
online_rkey: false
};
try {
if (this.core.apis.PacketApi.packetClient?.isConnected) {
if (this.core.apis.PacketApi.packetClient?.available) {
if ((!this.packetRkey || this.packetRkey[0].time > Date.now() / 1000)) {
this.packetRkey = await this.core.apis.PacketApi.sendRkeyPacket();
}