From 9072f155566a542635aede1fcb07208e0c56fb18 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 23 Dec 2021 00:02:43 +0100 Subject: [PATCH] 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. --- xmpp-vala/src/module/xep/0198_stream_management.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp-vala/src/module/xep/0198_stream_management.vala b/xmpp-vala/src/module/xep/0198_stream_management.vala index e053f3fb..10709d18 100644 --- a/xmpp-vala/src/module/xep/0198_stream_management.vala +++ b/xmpp-vala/src/module/xep/0198_stream_management.vala @@ -151,13 +151,13 @@ public class Module : XmppStreamNegotiationModule, WriteNodeFunc { check_queue(stream); ((IoXmppStream)stream).write_obj = this; } else if (node.name == "failed") { - stream.received_features_node(stream); session_id = null; 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.clear(); check_queue(stream); + stream.received_features_node(stream); } } }