Skip to content

Additional Causes for Disconnect Code 142: SessionTakenOver? #541

Answered by EandrewJones
EandrewJones asked this question in Q&A
Discussion options

You must be logged in to vote

I worked through a one file repro and discovered the problem.

class SocketConnection:
    def __init__(
        self,
        input_client_name: str,
        input_proxy_host: str,
        input_proxy_port: int,
        input_signing_region: str,
        input_endpoint: str,
        input_cognito_identity: str,
        input_client_id: str = f"connection-{str(uuid4())}", <---- This does not work
        callback: callable = None,
        subscriptions: List[mqtt5.Subscription] = None,
        session_behavior=mqtt5.ClientSessionBehaviorType.CLEAN,
        keep_alive_secs=30,
        session_expiry_interval_secs=60,
        logger: Optional[logging.Logger] = None,
    ):
    ...

Calling u…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@EandrewJones
Comment options

@EandrewJones
Comment options

Answer selected by EandrewJones
@bretambrose
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants