You've already forked AstralRinth
fix: use node instance url to fix staging (#4005)
* fix: use node instance url to fix staging * fix: check if node instance exists first
This commit is contained in:
@@ -194,13 +194,12 @@ export class ModrinthServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async testNodeReachability(): Promise<boolean> {
|
async testNodeReachability(): Promise<boolean> {
|
||||||
if (!this.general?.datacenter) {
|
if (!this.general?.node?.instance) {
|
||||||
console.warn("No datacenter info available for ping test");
|
console.warn("No node instance available for ping test");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const datacenter = this.general.datacenter;
|
const wsUrl = `wss://${this.general.node.instance}/pingtest`;
|
||||||
const wsUrl = `wss://${datacenter}.nodes.modrinth.com/pingtest`;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return await new Promise((resolve) => {
|
return await new Promise((resolve) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user