no err when updating

This commit is contained in:
Drew Ansbacher
2021-09-16 11:08:46 -06:00
committed by Matt Hill
parent b76c0dbabd
commit 539c721a68

View File

@@ -39,12 +39,19 @@ export class ConnectionService {
.pipe( .pipe(
distinctUntilChanged(), distinctUntilChanged(),
), ),
// 3
this.patch.watch$('server-info', 'update-progress')
.pipe(
distinctUntilChanged(),
),
]) ])
.subscribe(async ([network, patchConnection]) => { .subscribe(async ([network, patchConnection, progress]) => {
if (patchConnection !== PatchConnection.Disconnected) { if (patchConnection !== PatchConnection.Disconnected) {
this.connectionFailure$.next(ConnectionFailure.None) this.connectionFailure$.next(ConnectionFailure.None)
} else if (!network) { } else if (!network) {
this.connectionFailure$.next(ConnectionFailure.Network) this.connectionFailure$.next(ConnectionFailure.Network)
} else if (!progress && progress.downloaded === progress.size) {
this.connectionFailure$.next(ConnectionFailure.None)
} else if (!this.configService.isTor()) { } else if (!this.configService.isTor()) {
this.connectionFailure$.next(ConnectionFailure.Lan) this.connectionFailure$.next(ConnectionFailure.Lan)
} else { } else {