Project

General

Profile

Tigase close connection only when user relogin

Keren Meir
Added about 5 years ago

Hi,

I tried to check how (in the code) exactly the connection is being closed when I logout (from psi client).

I started the server, connected with psi client, then I logout. Only when I relogin, the tigase reaches "handleLogout" and "closeConnection" functions.

Is that behavior ok? and if it's ok - The session stays "alive" forever?

I'm using Tigase version 5.2.0 beta3

Thanks


Replies (9)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

This behavior is not correct. Tigase considers user disconnected when the TCP/IP connection is closed, regardless that was a proper logout or connection broken event.

I wonder if your Psi really closed network connection when you did the logout, or perhaps Psi closed but the operating system did not. What OS do you run Psi on?

To be honest I have not seen such a problem before. Could you please provide us some more information?

  1. Psi version

  2. Tigase version (OK, I got it from the 1st post)

  3. Operating system

  4. What exact function in Psi you select to logout

  5. Could you provide us with XML Console content from Psi what Psi sends on logout event

Added by Keren Meir about 5 years ago

  1. psi version - Psi v.014 running on windows 7 Enterprise

  2. Tigase version - 5.2.0 beta3

  3. The server run in eclipse (debug) on windows 7 Enterprise

  4. right click -> status -> offline. I also tried to kill the process and still the same behavior (or maybe I didn't wait enough time)

  5. offline packet from XML Console:

<presence type="unavailable" >
<status>Logged out</status>
</presence>
Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

Thank for all the details. This problem must be definitely related to your environment. I have just run a few tests with Psi and Tigase running as a stand alone application and connection is always properly closed when I logout from Psi and Tigase notices user logout instantly.

I do not have access to Windows at the moment so I cannot check your exact use case, though.

Could you please try test this on your system but with Tigase running as a standalone application instead of from Eclipse?

Added by Keren Meir about 5 years ago

Hi,

I tried it again, but now I took tigase-rc1 version and run it on Debian 7 OS, as a stand alone application.

And again, the Psi send the log-out presence (unavailable) and I see in Wireshark that the connection isn't being closed.

What can be the problem?

Thanks

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 5 years ago

I have just run a few tests and it looks like the problem is with Psi actually. If you set your status to offline in Psi it only sends presence unavailable to the server. It does not send stream close nor closes the TCP/IP connection. Therefore from the server point of view the user is still online with presence status set to unavailable. I was surprised to find out that this also happen on my laptop. I was sure that at some point in the past Psi really was disconnecting. I wonder if this is something specific to this version of the Psi client.

Tried Adium and this one really disconnects from the server.

Added by Keren Meir about 5 years ago

Ok thank you for your help.

Adium is a client for mac OS X... Do you know about any other good client that works on Windows?

Added by Wojciech Kapcia TigaseTeam about 5 years ago

Yes, Adium is an OSX client, but uses libpurple library, which is also used by Pidgin.

Added by Igor Khomenko over 4 years ago

I tried Tigase 5.2.0 release with iOS XMPPFramework https://github.com/robbiehanson/XMPPFramework

Just disconnect doesn't work - Tigase still thinks that mu user is online.

I decided to send '/stream:stream' before close TCP connection. Now it works fine.

Is it an expected behaviour?

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Igor, please open a new topic for a new question rather than adding your questions to an old topics.

The behavior you describe is not correct but what most likely happen is that when you call close TCP/IP connection in the iOS XMPP framework, the connection is not really closed, hence the Tigase thinks the client is still connected.

    (1-9/9)