feat: Automatically recover from frozen live streams (#2569)

- Closes: #2099
This commit is contained in:
Dermot Duffy
2026-07-07 21:37:24 -07:00
committed by GitHub
parent 9f956fe89f
commit fb1bbc739e
73 changed files with 3321 additions and 364 deletions
+3 -2
View File
@@ -1,12 +1,13 @@
import type { Connection } from 'home-assistant-js-websocket';
import type { UnsubscribeCallback } from '../../types';
import {
KeyedSubscriptionManager,
type GetKeyCallback,
} from '../../utils/concurrency/keyed-subscription-manager';
import { RetryTimer } from '../../utils/retry-timer';
import { isHassReady } from '../is-hass-ready';
import type { HASSSource, HASSUnlistenCallback } from '../source';
import type { HASSSource } from '../source';
import type { HomeAssistant } from '../types';
import type { HASSWebSocketLiveness, HASSWebSocketOpenCallback } from './types';
@@ -117,7 +118,7 @@ export class HASSConnectionSubscriptionManager<K, R> {
// subscribe/unsubscribe.
private _requests = new Map<R, RequestRegistration<K, R>>();
private _unlistenCallback: HASSUnlistenCallback | null = null;
private _unlistenCallback: UnsubscribeCallback | null = null;
constructor(getKeyCallback: GetKeyCallback<R, K>, source: HASSSource) {
this._getKeyCallback = getKeyCallback;