*PingRPCResponse returns a string, not an object

This commit is contained in:
Derrick Hammer 2022-08-31 18:25:04 -04:00
parent d7a17ca163
commit e30f1797fb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 4 deletions

View File

@ -14,9 +14,7 @@ interface StatFileResponse {
files: string[];
}
interface PingRPCResponse extends RPCResponse {
data?: {
ping?: any;
};
data?: "pong";
}
interface MethodsRPCResponse extends RPCResponse {
@ -228,7 +226,7 @@ function checkRelayLatency(relay: string, list: any[]) {
let resp = (await query.result) as PingRPCResponse;
if (!resp?.data?.ping) {
if (resp?.data !== "pong") {
return;
}