*PingRPCResponse returns a string, not an object
This commit is contained in:
parent
d7a17ca163
commit
e30f1797fb
|
@ -14,9 +14,7 @@ interface StatFileResponse {
|
||||||
files: string[];
|
files: string[];
|
||||||
}
|
}
|
||||||
interface PingRPCResponse extends RPCResponse {
|
interface PingRPCResponse extends RPCResponse {
|
||||||
data?: {
|
data?: "pong";
|
||||||
ping?: any;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MethodsRPCResponse extends RPCResponse {
|
interface MethodsRPCResponse extends RPCResponse {
|
||||||
|
@ -228,7 +226,7 @@ function checkRelayLatency(relay: string, list: any[]) {
|
||||||
|
|
||||||
let resp = (await query.result) as PingRPCResponse;
|
let resp = (await query.result) as PingRPCResponse;
|
||||||
|
|
||||||
if (!resp?.data?.ping) {
|
if (resp?.data !== "pong") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue