Client.reinitialise() changes transport type
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).
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.
Looks like the docs may have been updated to remove the text that was in error. Note that #850 requires a change to this function so may be worth considering addressing the protocol issue at the same time (referencing that issue so there is a link)