feat: wait for channel to open before triggering initial state updates (#963)

This commit is contained in:
Adam Shiervani 2025-11-13 10:48:03 +01:00 committed by GitHub
parent 5fb4c629dd
commit b074462ee7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -286,10 +286,13 @@ func newSession(config SessionConfig) (*Session, error) {
// Enqueue to ensure ordered processing // Enqueue to ensure ordered processing
session.rpcQueue <- msg session.rpcQueue <- msg
}) })
triggerOTAStateUpdate() // Wait for channel to be open before sending initial state
triggerVideoStateUpdate() d.OnOpen(func() {
triggerUSBStateUpdate() triggerOTAStateUpdate()
notifyFailsafeMode(session) triggerVideoStateUpdate()
triggerUSBStateUpdate()
notifyFailsafeMode(session)
})
case "terminal": case "terminal":
handleTerminalChannel(d) handleTerminalChannel(d)
case "serial": case "serial":