kmip/services/server/session.py
def run(self):
        """
        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.
        """
        self._logger.info("Starting session: {0}".format(self.name))

        try:
            self._connection.do_handshake()
        except Exception as e:
            self._logger.info("Failure running TLS handshake")
            self._logger.exception(e)
        else:
            while True:
                try:
                    self._handle_message_loop()
                except exceptions.ConnectionClosed as e:
                    break
                except Exception as e:
                    self._logger.info("Failure handling message loop")
                    self._logger.exception(e)

        self._connection.shutdown(socket.SHUT_RDWR)
        self._connection.close()
        self._logger.info("Stopping session: {0}".format(self.name))
def run(self):
        """
        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.
        """
        self._logger.info("Starting session: {0}".format(self.name))

        try:
            self._connection.do_handshake()
        except Exception as e:
            self._logger.info("Failure running TLS handshake")
            self._logger.exception(e)
        else:
            while True:
                try:
                    self._handle_message_loop()
                except exceptions.ConnectionClosed as e:
                    break
                except Exception as e:
                    self._logger.info("Failure handling message loop")
                    self._logger.exception(e)

        self._connection.shutdown(socket.SHUT_RDWR)
        self._connection.close()
        self._logger.info("Stopping session: {0}".format(self.name))
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.