skodaconnect / myskoda

Python library for interacting with MySkoda APIs.
MIT License
9 stars 22 forks source link

Temporary workaround for MQTT ConcurrentSubscribeError and stability #129

Closed dvx76 closed 3 weeks ago

dvx76 commented 3 weeks ago

Not fully clear about this yet but should at least help avoid skodaconnect/homeassistant-myskoda#140 and #123

When something causes the MQTT connection to drop both the on_disconnect and the on_socket_close fire and both trigger a reconnect. This leads to a ConcurrentSubscribeError and all kinds of weird networking and stability issues throughout HA as a result.

WebSpider commented 3 weeks ago

@dvx76 any idea what's causing the tests to fail?

dvx76 commented 3 weeks ago

@dvx76 any idea what's causing the tests to fail?

Looking at it. I think there is at least one test which tests exactly this scenario where the socket gets closed abruptly without there being an on_disconnect event.

dvx76 commented 3 weeks ago

@dvx76 any idea what's causing the tests to fail?

Looking at it. I think there is at least one test which tests exactly this scenario where the socket gets closed abruptly without there being an on_disconnect event.

Alternative solution: keep the on_socket_close but remove the reconnect call in it. Need to test this out in HA but effect should be the same and it doesn't break the tests.