I am using the API for the last several days – quite easy to learn!
I have hit what appears to be a timing problem related to changing a user’'s password.
I have a Java Swing GUI with an account management panel. From the panel, you can create an account, delete an account, and I was trying to add a change password feature.
I create an XMPP connection. I login to that connection as the user using the old password and then get an AccountManager for the connection and then pass in a new password using the changePassword method. If I close the connection and then create a new one, and attempt to login to the connection as the user using the new password, I get an XMPP Exception: 401 Unauthorized. If I immediately try and login as the user with the old password, most times I can still login!
If I wait long enough, the old password will no longer work and I must then use the new password to make a connection.
So I have 2 questions: 1) has anyone else seen this? and 2) is there a work-around? I am using the Jabberd 1.4.3 server. I have gone through my code looking for an error on my part but can’'t find one. Plus, if I wait long enough (sometime nearly a minute is required) the new password is effective.