Improved thread safety

This commit is contained in:
thomas committed 2022-08-16 20:42:35 +00:00
1 parent ae9ffb65c1
commit 39f727206f
11 files changed
+82 -8

No files matched your search

+2 -1
View File
@@ -13,7 +13,7 @@ export const ConnectionMixin = (SuperClass) => {
public browserEntities = {};
LOG(...args) {
return;
if (window.browser_mod_log === undefined) return;
const dt = new Date();
console.log(`${dt.toLocaleTimeString()}`, ...args);
@@ -37,6 +37,7 @@ export const ConnectionMixin = (SuperClass) => {
this.update_config(msg.result);
}
this._connectionResolve?.();
this._connectionResolve = undefined;
}
private update_config(cfg) {
+1
View File
@@ -32,6 +32,7 @@ interface FullyKiosk {
declare global {
interface Window {
browser_mod?: BrowserMod;
browser_mod_log?: any;
fully?: FullyKiosk;
hassConnection?: Promise<any>;
customCards?: [{}?];