How to check if user is already logged in to openfire?

hey,

sometimes my app throws a IllegalStateException “Illegal State Exception Already logged in to server. Already logged in to server.” or a Steam Error: “ConnectionClosedError: conflict”.

How can I check if the user is already logged in to openfire in my connection routine?

Thanks