SASL authentication failed using mechanism DIGEST-MD5 after entering a wrong password


I have a little authentication problem with smack. If the user enter the right password first, there is no problem and the user get connected.

If the user enter a wrong password, the login is denied. But if he enter the right password after that, it still get denied until I restart my application. I get this error :

SASL authentication failed using mechanism DIGEST-MD5:         at org.jivesoftware.smack.SASLAuthentication.authenticate(
        at org.jivesoftware.smack.XMPPConnection.login(

I verified in debug mode that the new password is being sent.

Any idea?