fix(core): Remove the negotiation lock

This commit is contained in:
PapaTutuWawa 2023-09-29 20:29:25 +02:00
parent 49d3c6411b
commit 59b90307c2
2 changed files with 0 additions and 8 deletions

View File

@ -595,8 +595,6 @@ class XmppConnection {
await _reconnectionPolicy.setShouldReconnect(true);
}
_incomingStanzaQueue.negotiationsDone = true;
// Tell consumers of the event stream that we're done with stream feature
// negotiations
await _sendEvent(
@ -851,9 +849,7 @@ class XmppConnection {
await _negotiationsHandler.negotiate(event);
break;
case RoutingState.handleStanzas:
_log.finest('Handling ${node.tag} (${node.attributes["id"]})');
await _handleStanza(node);
_log.finest('Handling ${node.tag} (${node.attributes["id"]}) done');
break;
case RoutingState.preConnection:
case RoutingState.error:
@ -918,7 +914,6 @@ class XmppConnection {
// Kill a possibly existing connection
_socket.close();
_incomingStanzaQueue.negotiationsDone = false;
await _reconnectionPolicy.reset();
_enableReconnectOnSuccess = enableReconnectOnSuccess;
if (shouldReconnect) {

View File

@ -25,9 +25,6 @@ class IncomingStanzaQueue {
/// Lock guarding both [_queue] and [_isRunning].
final Lock _lock = Lock();
// TODO: Remove once we can await stanzas (or can we).
bool negotiationsDone = false;
/// Logger.
final Logger _log = Logger('IncomingStanzaQueue');