Fix device online state clobbered by debug ping in _status_changed
The INFO-level logging guard in _status_changed() called device.ping() before logging, purely to show accurate online status. But ping() has side effects — it sets device.online based on the result. When a ConnectionStateChangedEvent correctly marked a device online, the subsequent _status_changed() callback would re-ping. If the device wasn't ready yet (e.g. Centurion headset still booting), the ping timed out and set online back to False, requiring 2-3 power cycles to sync state. Remove the unnecessary ping — the log message already reads device.online which reflects the state set by the event handler.
This commit is contained in:
parent
9e36ede037
commit
3d2c8a351f
|
|
@ -115,7 +115,6 @@ class SolaarListener(listener.EventsListener):
|
|||
reason or "",
|
||||
)
|
||||
else:
|
||||
device.ping()
|
||||
logger.info(
|
||||
"status_changed %r: %s %s (%X) %s",
|
||||
device,
|
||||
|
|
|
|||
Loading…
Reference in New Issue