I noticed that once the attribute XMPPTCPConnection.usingTLS is set to true (after a successful TLS handshake), the attribute is never set to back to false, even if the next reconnection doesn't use TLS.
I think it should be reset in the shutdown method.