V45.7b: fix TCP loading loop — _notifyStatus chi fire cb khi connected doi (poller queryStatus 400ms tung reset map + reload track -> LOAD skip vo han)
This commit is contained in:
@@ -17,8 +17,13 @@
|
||||
/** D10: UI subscribes to bridge connection changes. cb({connected}) or null to clear. */
|
||||
onStatusChange: function (cb) { this._statusCb = cb; },
|
||||
_notifyStatus: function (connected) {
|
||||
this.isBridgeConnected = !!connected;
|
||||
if (this._statusCb) this._statusCb({ connected: !!connected });
|
||||
connected = !!connected;
|
||||
// Loop guard (V45.7): poller queryStatus moi 400ms tung goi cb du connected
|
||||
// khong doi -> App reset map + reload toan bo track -> mark loading lai ->
|
||||
// poller lai thay loading -> LOAD skip vo han. Chi fire khi TRANG THAI DOI.
|
||||
if (this.isBridgeConnected === connected) return;
|
||||
this.isBridgeConnected = connected;
|
||||
if (this._statusCb) this._statusCb({ connected: connected });
|
||||
},
|
||||
|
||||
/** Fix C: re-establish bridge routing once audio frames arrive again
|
||||
|
||||
Reference in New Issue
Block a user