In the method org.jivesoftware.smack.Connection.addConnectionListener() it has a guard to not accept a ConnectionListener unless the underlying connection is already connected. I see no reason to impose such a restriction that ConnectionListeners should only be added after the connection is made. In fact it actually causes us an issue where the connection fails before returning from the XMPPConnect.connect() call.
This has come about because we have implmented the see-other-host extension which requires to know that connection fails due to receiving the See-Other-Host message.
Our question is can the !connected() call be safely removed from the addConnectionListener() method?