None of these were needed in the first place
This commit is contained in:
parent
42188ee6d4
commit
d5c7b38b57
1 changed files with 1 additions and 7 deletions
|
@ -99,7 +99,6 @@ exports.connect = (server) => {
|
|||
for (const uuid of Object.keys(jobs)) {
|
||||
if (jobs[uuid].addr === connection.remoteAddress) jobs[uuid].event.emit("error", new Error("Job ended prematurely due to a closed connection; please run your image job again"));
|
||||
}
|
||||
this.connections = this.connections.filter((val) => val.remoteAddress !== connection.remoteAddress);
|
||||
});
|
||||
this.connections.push(connection);
|
||||
resolve();
|
||||
|
@ -131,12 +130,7 @@ const getIdeal = () => {
|
|||
}, 5000);
|
||||
for (const connection of this.connections) {
|
||||
if (!connection.remoteAddress) continue;
|
||||
let promise = new Promise((resolveTest) => { resolveTest(); });
|
||||
if (connection.destroyed) {
|
||||
this.connections = this.connections.filter((val) => val.remoteAddress !== connection.remoteAddress);
|
||||
promise = this.connect(connection.remoteAddress);
|
||||
}
|
||||
promise.then(() => fetch(`http://${connection.remoteAddress}:8081/status`)).then(statusRequest => statusRequest.text()).then(async (status) => {
|
||||
fetch(`http://${connection.remoteAddress}:8081/status`).then(statusRequest => statusRequest.text()).then(async (status) => {
|
||||
serversLeft--;
|
||||
idealServers.push({
|
||||
addr: connection.remoteAddress,
|
||||
|
|
Loading…
Reference in a new issue