occasional exception in zeroconf stops HAP listener
Occasionally, I encounter a problem like this:
python3[433]: WARNING:zeroconf:Exception occurred:
python3[433]: Traceback (most recent call last):
python3[433]: File "/home/pi/.local/lib/python3.5/site-packages/zeroconf.py", line 2245, in send
python3[433]: bytes_sent = s.sendto(packet, 0, (addr, port))
python3[433]: OSError: [Errno 22] Invalid argument
My script doesn't exit, it just appears that the HAP server stops listening on HTTP, thus rendering the service basically dead (without exiting, which would allow systemd to restart it).
Am I doing something wrong? Should I be trying to manually handle this exception somehow?
My listener: https://github.com/kolbe/Floathouse/blob/master/hap_driver.py My accessory: https://github.com/kolbe/Floathouse/blob/master/LightBulb.py
I was using HAP-python 2.4.2, but I just upgraded to 2.6.0. It doesn't look like there are any changes that would affect this.
Thanks!
This should be fixed in the latest zeroconf. Are you still seeing this issue?
I think this can be closed now