mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: 注释掉无用代码
This commit is contained in:
@@ -46,11 +46,11 @@ export class NTQQGroupApi {
|
||||
this.groupCache.set(group.groupCode, group);
|
||||
}
|
||||
this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`);
|
||||
console.log('pid', process.pid);
|
||||
//console.log('pid', process.pid);
|
||||
// this.session = await frida.attach(process.pid);
|
||||
setTimeout(async () => {
|
||||
this.sendPocketRkey();
|
||||
}, 10000);
|
||||
// setTimeout(async () => {
|
||||
// this.sendPocketRkey();
|
||||
// }, 10000);
|
||||
}
|
||||
async getCoreAndBaseInfo(uids: string[]) {
|
||||
return await this.core.eventWrapper.callNoListenerEvent(
|
||||
@@ -62,7 +62,7 @@ export class NTQQGroupApi {
|
||||
async sendPocketRkey() {
|
||||
let hex = '08E7A00210CA01221D0A130A05080110CA011206A80602B006011A0208022206080A081408022A006001';
|
||||
let ret = await this.core.apis.PacketApi.sendPacket('OidbSvcTrpcTcp.0x9067_202', hex, true);
|
||||
console.log('ret: ', ret);
|
||||
//console.log('ret: ', ret);
|
||||
}
|
||||
async sendPacketPoke(group: number, peer: number) {
|
||||
let data = encodeGroupPoke(group, peer);
|
||||
|
@@ -17,6 +17,7 @@ export class PacketClient {
|
||||
this.logger.log.bind(this.logger)(`Attempting to connect to ${this.url}`);
|
||||
this.websocket = new WebSocket(this.url);
|
||||
this.websocket.on('error', (err) => this.logger.logError.bind(this.logger)('[Core] [Packet Server] Error:', err.message));
|
||||
|
||||
this.websocket.onopen = () => {
|
||||
this.isConnected = true;
|
||||
this.reconnectAttempts = 0;
|
||||
@@ -44,12 +45,16 @@ export class PacketClient {
|
||||
}
|
||||
|
||||
private attemptReconnect(): void {
|
||||
if (this.reconnectAttempts < this.maxReconnectAttempts) {
|
||||
this.reconnectAttempts++;
|
||||
this.logger.logError.bind(this.logger)(`Reconnecting attempt ${this.reconnectAttempts}`);
|
||||
setTimeout(() => this.connect().then().catch(), 1000 * this.reconnectAttempts);
|
||||
} else {
|
||||
this.logger.logError.bind(this.logger)(`Max reconnect attempts reached. Could not reconnect to ${this.url}`);
|
||||
try {
|
||||
if (this.reconnectAttempts < this.maxReconnectAttempts) {
|
||||
this.reconnectAttempts++;
|
||||
this.logger.logError.bind(this.logger)(`Reconnecting attempt ${this.reconnectAttempts}`);
|
||||
setTimeout(() => this.connect().then().catch(), 1000 * this.reconnectAttempts);
|
||||
} else {
|
||||
this.logger.logError.bind(this.logger)(`Max reconnect attempts reached. Could not reconnect to ${this.url}`);
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.logError.bind(this.logger)(`Error attempting to reconnect: ${error}`);
|
||||
}
|
||||
}
|
||||
async registerCallback(trace_id: string, type: string, callback: any): Promise<void> {
|
||||
|
Reference in New Issue
Block a user