Forget previous session on failed stream resumption (#1164)
Assuming received_features_node() is what triggers another attempt to authenticate, this should prevent an attempt to XEP-0198 resume again using the same session id.
This commit is contained in:
parent
795af2d9ce
commit
9072f15556
|
@ -151,13 +151,13 @@ public class Module : XmppStreamNegotiationModule, WriteNodeFunc {
|
||||||
check_queue(stream);
|
check_queue(stream);
|
||||||
((IoXmppStream)stream).write_obj = this;
|
((IoXmppStream)stream).write_obj = this;
|
||||||
} else if (node.name == "failed") {
|
} else if (node.name == "failed") {
|
||||||
stream.received_features_node(stream);
|
|
||||||
session_id = null;
|
session_id = null;
|
||||||
foreach (var id in in_flight_stanzas.keys) {
|
foreach (var id in in_flight_stanzas.keys) {
|
||||||
in_flight_stanzas[id].promise.set_exception(new IOStreamError.WRITE("Stanza not acked and session not resumed"));
|
in_flight_stanzas[id].promise.set_exception(new IOStreamError.WRITE("Stanza not acked and session not resumed"));
|
||||||
}
|
}
|
||||||
in_flight_stanzas.clear();
|
in_flight_stanzas.clear();
|
||||||
check_queue(stream);
|
check_queue(stream);
|
||||||
|
stream.received_features_node(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue