fix(core): Remove the negotiation lock
This commit is contained in:
parent
49d3c6411b
commit
59b90307c2
@ -595,8 +595,6 @@ class XmppConnection {
|
|||||||
await _reconnectionPolicy.setShouldReconnect(true);
|
await _reconnectionPolicy.setShouldReconnect(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
_incomingStanzaQueue.negotiationsDone = true;
|
|
||||||
|
|
||||||
// Tell consumers of the event stream that we're done with stream feature
|
// Tell consumers of the event stream that we're done with stream feature
|
||||||
// negotiations
|
// negotiations
|
||||||
await _sendEvent(
|
await _sendEvent(
|
||||||
@ -851,9 +849,7 @@ class XmppConnection {
|
|||||||
await _negotiationsHandler.negotiate(event);
|
await _negotiationsHandler.negotiate(event);
|
||||||
break;
|
break;
|
||||||
case RoutingState.handleStanzas:
|
case RoutingState.handleStanzas:
|
||||||
_log.finest('Handling ${node.tag} (${node.attributes["id"]})');
|
|
||||||
await _handleStanza(node);
|
await _handleStanza(node);
|
||||||
_log.finest('Handling ${node.tag} (${node.attributes["id"]}) done');
|
|
||||||
break;
|
break;
|
||||||
case RoutingState.preConnection:
|
case RoutingState.preConnection:
|
||||||
case RoutingState.error:
|
case RoutingState.error:
|
||||||
@ -918,7 +914,6 @@ class XmppConnection {
|
|||||||
// Kill a possibly existing connection
|
// Kill a possibly existing connection
|
||||||
_socket.close();
|
_socket.close();
|
||||||
|
|
||||||
_incomingStanzaQueue.negotiationsDone = false;
|
|
||||||
await _reconnectionPolicy.reset();
|
await _reconnectionPolicy.reset();
|
||||||
_enableReconnectOnSuccess = enableReconnectOnSuccess;
|
_enableReconnectOnSuccess = enableReconnectOnSuccess;
|
||||||
if (shouldReconnect) {
|
if (shouldReconnect) {
|
||||||
|
@ -25,9 +25,6 @@ class IncomingStanzaQueue {
|
|||||||
/// Lock guarding both [_queue] and [_isRunning].
|
/// Lock guarding both [_queue] and [_isRunning].
|
||||||
final Lock _lock = Lock();
|
final Lock _lock = Lock();
|
||||||
|
|
||||||
// TODO: Remove once we can await stanzas (or can we).
|
|
||||||
bool negotiationsDone = false;
|
|
||||||
|
|
||||||
/// Logger.
|
/// Logger.
|
||||||
final Logger _log = Logger('IncomingStanzaQueue');
|
final Logger _log = Logger('IncomingStanzaQueue');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user