Smack: 4.4.4
XMPP Server: eJabberd
Problem:
I want user to logout immediately so that Server cannot send message to the disconnected client and loose that message. I have tried disconnect(presence)
but Psi+ sees me as connected. Here is my latest attempt that didn’t work also
fun logout() {
connection.sendStanza(
MessageBuilder.buildPresence()
.ofType(Presence.Type.unavailable)
.build()
)
connection.instantShutdown()
}
How do I do instant logout?
Here is relevant log from eJabberd. Note that even after 300secs am still online in Psi+
Closing c2s connection for stefano@localhost/App: Connection failed: connection closed; waiting 300 seconds for stream resumption
Where do I go wrong?