def disconnect(self):
        """Disconnect from AWS IOT message broker
        """

        if self.client is None:
            return

        try:
            self.client.disconnect()
        except operationError as exc:
            raise InternalError("Could not disconnect from AWS IOT", message=exc.message)
def disconnect ( self ) : if self . client is None : return try : self . client . disconnect ( ) except operationError as exc : raise InternalError ( "Could not disconnect from AWS IOT" , message = exc . message )
Disconnect from AWS IOT message broker