Closed TatankaConCube closed 4 years ago
Do you have any thinks about this issue?
Hi Tatanka, Can you please check if issue is fixed with latest push? I test it with few seconds delay between connect close and connect
The issue still reproduces on current master branch from this repo. My second login stoped on state State: XmppConnectionState.DoneParsingFeatures
but not State: XmppConnectionState.Ready
like expected. Here full log with second login.
I tried use workaround and create new instance of Connection
every time. What I mean:
_connection = xmpp.Connection(account);
_connection.connect();
then for logout use
_connection.close();
_connection = null;
then second login
_connection = xmpp.Connection(account);
_connection.connect();
but in this case after second login this code stoped wort, this stream stoped triggering although a receive incoming messages
_messageHandler = MessageHandler.getInstance(connection);
_messageHandler.messagesStream.listen((messageStanza) {
onReceiveNewMessageStanza(messageStanza);
});
@vukoye I investigated this issue again. It looks like issue related with sending package "http://jabber.org/protocol/disco#info"
I/flutter ( 2793): sending: <iq id="CLQYNURMR" type="get" from="1425506-476@chat.connectycube.com/flutter_48ec3d2f0044e518" to="chat.connectycube.com">
I/flutter ( 2793): <query xmlns="http://jabber.org/protocol/disco#info"/>
I/flutter ( 2793): </iq>
this package doesn't send during second login.
It is because ConnectionNegotatiorManager
adds ServiceDiscoveryNegotiator
as singleton and on second login method pickNextNegotatiator()
didn't return this negotiator because its state is NegotiatorState.DONE
on second login.
Second unclear pieces of code: https://github.com/vukoye/xmpp_dart/blob/master/lib/src/features/ConnectionNegotatiorManager.dart#L134 and https://github.com/vukoye/xmpp_dart/blob/master/lib/src/features/ConnectionNegotatiorManager.dart#L140 this code does nothing.
@vukoye can you please review ConnectionNegotatiorManager
I think it is reason of issues related with second login.
@vukoye I prepared Merge request https://github.com/vukoye/xmpp_dart/pull/27 Please review it and apply.
Version: 0.2.3 Steps:
I investigated code of your file Connection.dart and found issue here, I think you mean '=' instead of '==';
After changes in this place second login was started but didn't call all steps for login, just stoped after process features.
If you need more informations or logs, please let me know.