Skip to content

Commit

Permalink
always select same ip
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTrunk committed Dec 28, 2023
1 parent b0c0665 commit f8923d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/services/domainService.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ let myFDMnameORip = null;
let permanentMessages = null;
let globalAppSpecs = null;
const unifiedAppsDomains = [];
const mapOfNamesIps = {};

async function getPermanentMessages() {
try {
Expand Down Expand Up @@ -193,6 +194,11 @@ async function selectIPforMinecraft(ips, app) {
chosenIpSum = sum;
}
}
if (ips.includes(mapOfNamesIps[app.name])) {
chosenIp = mapOfNamesIps[app.name];
} else {
mapOfNamesIps[app.name] = chosenIp;
}
const isOk = await applicationChecks.checkApplication(app, chosenIp);
if (isOk) {
return chosenIp;
Expand Down

0 comments on commit f8923d4

Please sign in to comment.