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:
IMB11
2025-07-16 19:57:31 +01:00
committed by GitHub
parent 62f5a23fcb
commit cee1b5f522

View File

@@ -194,13 +194,12 @@ export class ModrinthServer {
}
async testNodeReachability(): Promise<boolean> {
if (!this.general?.datacenter) {
console.warn("No datacenter info available for ping test");
if (!this.general?.node?.instance) {
console.warn("No node instance available for ping test");
return false;
}
const datacenter = this.general.datacenter;
const wsUrl = `wss://${datacenter}.nodes.modrinth.com/pingtest`;
const wsUrl = `wss://${this.general.node.instance}/pingtest`;
try {
return await new Promise((resolve) => {