-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.priority/normalNot that urgent, but is importantNot that urgent, but is important
Description
What would you like to be added? / User Story: At the moment WebSocket added in #2008 is handled through 2 subjects. One of them is a representation of connection with the API, the second one acts like a proxy that is filtered from errors. We should check if we can improve it and remove the proxy subject to simplify things.
Example (not working in 100%):
get adminSettings(): Observable<AdminSettings> {
const webSocket$ = webSocket<AdminSettings>(`${this.wsRoot}/admin/settings`).pipe(
startWith(DEFAULT_ADMIN_SETTINGS),
catchError(() => onErrorResumeNext(EMPTY)),
map(settings => this._defaultAdminSettings(settings)),
shareReplay({refCount: true, bufferSize: 1})
);
return iif(() => this._auth.authenticated(), webSocket$, of(DEFAULT_ADMIN_SETTINGS));
}Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.priority/normalNot that urgent, but is importantNot that urgent, but is important