mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-15 23:20:01 -04:00
update visuals of <Proxy/>
This commit is contained in:
parent
bc80f9171c
commit
ec58ef0e37
3 changed files with 85 additions and 15 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue