mirror of
https://github.com/colanode/colanode.git
synced 2025-12-16 11:47:47 +01:00
Consider servers as available by default on init (#214)
This commit is contained in:
@@ -18,7 +18,7 @@ const debug = createDebugger('desktop:service:server');
|
|||||||
export class ServerService {
|
export class ServerService {
|
||||||
private readonly app: AppService;
|
private readonly app: AppService;
|
||||||
|
|
||||||
public state: ServerState | null = null;
|
public state: ServerState;
|
||||||
public isOutdated: boolean;
|
public isOutdated: boolean;
|
||||||
|
|
||||||
public readonly server: Server;
|
public readonly server: Server;
|
||||||
@@ -33,6 +33,13 @@ export class ServerService {
|
|||||||
this.socketBaseUrl = this.buildSocketBaseUrl();
|
this.socketBaseUrl = this.buildSocketBaseUrl();
|
||||||
this.httpBaseUrl = this.buildHttpBaseUrl();
|
this.httpBaseUrl = this.buildHttpBaseUrl();
|
||||||
this.isOutdated = isServerOutdated(server.version);
|
this.isOutdated = isServerOutdated(server.version);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
isAvailable: true,
|
||||||
|
lastCheckedAt: new Date(),
|
||||||
|
lastCheckedSuccessfullyAt: null,
|
||||||
|
count: 0,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public get isAvailable() {
|
public get isAvailable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user