Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.reinitialise() changes transport type #763

Open
stradiot opened this issue Nov 28, 2023 · 1 comment
Open

Client.reinitialise() changes transport type #763

stradiot opened this issue Nov 28, 2023 · 1 comment
Labels
Status: Available No one has claimed responsibility for resolving this issue. Type: Bug

Comments

@stradiot
Copy link

The reinitialise() method of the client does not take the same arguments as the constructor (contrary to what the documentation says). This causes the unspecified arguments to change to default values.

If using websockets as a transport type, after calling reinitialise() the transport is changed to the default TCP and the client is unable to connect. This also applies to other unsupported arguments (protocol version and autoreconnect).

image image image
@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Nov 28, 2023
@PierreF
Copy link
Contributor

PierreF commented Jan 7, 2024

Do you see an use case of reinitialise that is not solved by really re-creating the client ?
E.g. instead of:

myclient.reinitialise([...])

Do:

myclient = paho.Client([...])

I think the second option is much better as it's clear that nothing is kept and it would solve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue. Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants