From 8c1625815928e288499d98cc2e3d0215e192e591 Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Thu, 16 Sep 2021 11:08:46 -0600 Subject: [PATCH] no err when updating --- ui/src/app/services/connection.service.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/src/app/services/connection.service.ts b/ui/src/app/services/connection.service.ts index cf8fe157e..69d45c4b3 100644 --- a/ui/src/app/services/connection.service.ts +++ b/ui/src/app/services/connection.service.ts @@ -39,12 +39,19 @@ export class ConnectionService { .pipe( distinctUntilChanged(), ), + // 3 + this.patch.watch$('server-info', 'update-progress') + .pipe( + distinctUntilChanged(), + ), ]) - .subscribe(async ([network, patchConnection]) => { + .subscribe(async ([network, patchConnection, progress]) => { if (patchConnection !== PatchConnection.Disconnected) { this.connectionFailure$.next(ConnectionFailure.None) } else if (!network) { this.connectionFailure$.next(ConnectionFailure.Network) + } else if (!progress && progress.downloaded === progress.size) { + this.connectionFailure$.next(ConnectionFailure.None) } else if (!this.configService.isTor()) { this.connectionFailure$.next(ConnectionFailure.Lan) } else {