vukoye / xmpp_dart

Lightweight XMPP client library written in Dart
Apache License 2.0
83 stars 64 forks source link

Bug report: Stream Management doesn't work after reconnect. #28

Closed TatankaConCube closed 4 years ago

TatankaConCube commented 4 years ago

Version: 0.2.5

Did it work before: No, we had same issue on 0.2.3

Steps to reproduce:

  1. Connect to the chat:
    String userJid = ""; // full user jid
    xmpp.XmppAccountSettings accountSettings = xmpp.XmppAccountSettings.fromJid(userJid, password);
    xmpp.Connection _connection = xmpp.Connection.getInstance(accountSettings);
    _connection.connect();
  2. Close chant connection:
    _connection.close();
  3. Connect again:
    _connection.connect();

Actual result: Request on enabling Stream management doesn't send. Stream management ackRequests doesn't send to the server.

Expected result: Request on enabling Stream management sends like after first login. Stream management ackRequests send to the server every 5 second like after first login.

Additional info: Looks like issue related with StreamManagementModule and ConnectionNegotatiorManager which uses singleton of StreamManagementModule and during second login it doesn't initialise, because already has state NegotiatorState.DONE.

vukoye commented 4 years ago

Can you please check this issue with latest commit? I fixed few additional bugs I found.

TatankaConCube commented 4 years ago

In the current 'master' branch it is working, thank you for your work. Closing.