update visuals of <Proxy/>

This commit is contained in:
CoolElectronics 2023-08-17 12:55:50 -04:00
parent bc80f9171c
commit ec58ef0e37
No known key found for this signature in database
GPG key ID: F63593D168636C50
3 changed files with 85 additions and 15 deletions

View file

@ -88,8 +88,20 @@ async function login(credentials: any) {
console.log(chalk.blue("Starting server!"));
if (conf.type == "swarm") {
let trackerws = new WebSocket(tracker.tracker + "/join");
connectTracker(trackerws);
let connect = () => {
let trackerws = new WebSocket(tracker.tracker + "/join");
trackerws.onclose = () => {
console.log(`Disconnected from tracker. Retrying...`)
setTimeout(() => {
connect();
}, 10000);
};
trackerws.onopen = () => {
console.log(`Connected to tracker ${tracker.tracker}`)
}
connectTracker(trackerws);
};
connect();
} else {
initializeApp(tracker.firebase);