Consider servers as available by default on init (#214)

This commit is contained in:
Hakan Shehu
2025-09-11 16:50:05 +02:00
committed by GitHub
parent f8cf2c8c56
commit 733a4d1f59

View File

@@ -18,7 +18,7 @@ const debug = createDebugger('desktop:service:server');
export class ServerService {
private readonly app: AppService;
public state: ServerState | null = null;
public state: ServerState;
public isOutdated: boolean;
public readonly server: Server;
@@ -33,6 +33,13 @@ export class ServerService {
this.socketBaseUrl = this.buildSocketBaseUrl();
this.httpBaseUrl = this.buildHttpBaseUrl();
this.isOutdated = isServerOutdated(server.version);
this.state = {
isAvailable: true,
lastCheckedAt: new Date(),
lastCheckedSuccessfullyAt: null,
count: 0,
};
}
public get isAvailable() {