Connection cleanup does not notify accessories
In the case of a camera accessory - cleanup is important for shutting down the live stream to free up the resource for another client to connect. In the case of a failed network connection, and resulting "connection timeout", pyhap may "clean up" a connection involved in a live stream, and the live stream is hence not sent the "stop_stream" signal.
Error logs look something like this:
2020-07-24 12:46:33,299 [DEBUG ] [hap_server ] Connection timeout for ('10.0.1.164', 52615) with exception [Errno 113] No route to host 2020-07-24 12:46:33,300 [DEBUG ] [hap_server ] Current connections {('10.0.1.49', 63792): <pyhap.hap_server.HAPSocket object at 0xa4613750>, ('10.0.1.116', 49962): <pyhap.hap_server.HAPSocket object at 0xaf1a3d10>, ('10.0.1.178', 51501): <pyhap.hap_server.HAPSocket object at 0xa4613a70>, ('10.0.1.103', 50561): <pyhap.hap_server.HAPSocket object at 0xaf1a3f70>, ('10.0.1.164', 52615): <pyhap.hap_server.HAPSocket object at 0xa46138b0>} 2020-07-24 12:46:33,303 [DEBUG ] [hap_server ] Connection timeout 2020-07-24 12:46:33,303 [DEBUG ] [hap_server ] Cleaning connection to ('10.0.1.164', 52615)