client/init.py has:
self.__buffer = body
It looks like self.__buffer is never used, which means that if any bytes (e.g., the first data packet) are received along with the headers, those bytes will be ignored and the connection will probably get into a bad state.
Adding this after handshake_ok() fixes things in this case:
if body != '':
process(body)
Does that seem like a reasonable fix?