def run(self):
self._logger.info("<STR_LIT>".format(self.name))<EOL>try:<EOL><INDENT>self._connection.do_handshake()<EOL><DEDENT>except Exception as e:<EOL><INDENT>self._logger.info("<STR_LIT>")<EOL>self._logger.exception(e)<EOL><DEDENT>else:<EOL><INDENT>while True:<EOL><INDENT>try:<EOL><INDENT>self._handle_message_loop()<EOL><DEDENT>except exceptions.ConnectionClosed as e:<EOL><INDENT>break<EOL><DEDENT>except Exception as e:<EOL><INDENT>self._logger.info("<STR_LIT>")<EOL>self._logger.exception(e)<EOL><DEDENT><DEDENT><DEDENT>self._connection.shutdown(socket.SHUT_RDWR)<EOL>self._connection.close()<EOL>self._logger.info("<STR_LIT>".format(self.name))<EOL>
The main thread routine executed by invoking thread.start.

This method manages the new client connection, running a message
handling loop. Once this method completes, the thread is finished.