After running hap for several days my system hit the limit of listen sockets (128 default on raspbian). Most of them in CLOSE_WAIT, so hap-client sent FIN but hap-server code didn't handle it correctly (it suppose to close socket).
>netstat -an | egrep 51826.+CLOSE_WAIT | wc -l
122
Briefly looked into hap_server.py, can't see how is this situation handled