tigase / siskin-im

(M) Public Project of Tigase Messenger for iOS devices based on Tigase Swift XMPP library.
GNU General Public License v3.0
173 stars 37 forks source link

Connection time is too high 1 to 2 mins, for some users it is taking upto 3 min #235

Open dhaval-dobariya opened 11 months ago

dhaval-dobariya commented 11 months ago

On every app launch or even app open form background connection is taking much time I have also tried app from AppStore, it is also taking same amount of time on every app launch or app open from background

To Reproduce Steps to reproduce the behavior:

  1. You can use any existing users
  2. Send messages to 2nd user
  3. Open app of 1st user and observe the time you get those message or you are connected to server to start communication with connected users

Expected behavior It should connect faster may be within 15 to 30 secs max

Screenshots App Launch After sometime
IMG_0641 IMG_0642

Details (please complete the following information):

dhaval-dobariya commented 10 months ago

@hantu85 do you have any solution/idea about this issue?

hantu85 commented 10 months ago

I've seen issues like that, but those issues were releated to XMPP protocol connection establishment (what is a multistep process, a few exchanges back and forth for which client needs to wait for a response from a server). That happens usually on a slow connection or a connection with a huge delays, ie. when a lot of retransmissions is required for a single TCP package or when client connects to the server with a large RTT (round trip time, ping to the server is high).

Client is already optimized to handle those situations and tries to use the best possible strategy, ie. use DirectTLS connection instead of StartTLS if XMPP server supports that.

New version, that is still worked on will support SASL2 and Bind2 that should improve reconnection times when server will support it, but there is no ETA on that.

manishvpatel commented 4 months ago

@hantu85 I have integrated library and facing the same issue. It does not connect in up to 4 mins. I tried to disconnect and connect user in loop with 10 seconds interval until it connects but still that is not working. It is usually happens in slow network e.g less than 80-100 mbps speed.

Do you have any temporary patch or solution for this issue?

@dhaval-dobariya did you get any solution around this issue?

Thanks.