[RESOLVED-PATCHED] Duplicate "Smack Reconnection Manager" thread

Hello,

I have a “random” bug with my smack application. When the client got disconnected by the server, sometime it will try to connect twice (the second connection throws an IllegalStateException (Already logged in to server)).

When I run my application in a debugger, I see that there is two “Smack Reconnection Manager” threads running when this bug occurs. So I guess the problem is with this duplicated thread.

What can cause this to happen? I suspect I do something wrong with my code… Any idea?

Thanks!

EDIT: cannot reply my own message!?

I made a patch to ReconnectionManager.java class to avoid that more than one Smack Reconnection Manager thread run at the same time.

My patch also fix a bug in the delay between reconnection (it always wait 10 seconds because the attempts variable is not incremented). I also modified the function to wait a random time to avoid server to be rushed when there is a downtime.

You can do what you want with this patch.

Thanks.

Ce message a été modifié par: Ohmer
smack.diff.zip (732 Bytes)

I have filed this as SMACK-325

What do you mean you can’t reply?

I found the problem. The reply form doesn’t work if my account is set to the french language. If I set it to english, it works.

Do you mean forum account settings? What setting exactly do you mean? I have tried to change Language (no impact). and i don’t have French in Locale combobox.

Yep in the account settngs. There is a combo-box for locale and for language. French is in the language combo-box.

Once you changed that setting, refresh the thread and try to click the reply button. This sould not work.

Works for me.

Well… I will keep the english language

Developers say your patch file is broken. Can you check it and attach again?

could not patch this .diff file. seems to me that you created it with svnlook. svnlook could only show the differences between revision, but the created diff files from there aren’t patchable. please use ‘svn diff’ to create a patch, or maybe tortoise