diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-23 00:08:12 +0100 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2021-12-30 16:26:53 +0100 |
commit | 839be0e316bf756ddccb9eba17b75c974440093c (patch) | |
tree | 09fb3e02c2cd163a68e3d3851b5679a1885465ed /xmpp-vala | |
parent | 9072f155566a542635aede1fcb07208e0c56fb18 (diff) | |
download | dino-839be0e316bf756ddccb9eba17b75c974440093c.tar.gz dino-839be0e316bf756ddccb9eba17b75c974440093c.zip |
Collect previous counter from failed stream resumption
The server is allowed to keep the counter after the session has expired,
which allows a final ack to know wheter in-transit stanzas were
delivered or not.
Diffstat (limited to 'xmpp-vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0198_stream_management.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0198_stream_management.vala b/xmpp-vala/src/module/xep/0198_stream_management.vala index 10709d18..5ce208f1 100644 --- a/xmpp-vala/src/module/xep/0198_stream_management.vala +++ b/xmpp-vala/src/module/xep/0198_stream_management.vala @@ -152,6 +152,11 @@ public class Module : XmppStreamNegotiationModule, WriteNodeFunc { ((IoXmppStream)stream).write_obj = this; } else if (node.name == "failed") { session_id = null; + string? h_acked = node.get_attribute("h", NS_URI); + if (h_acked != null) { + h_outbound = int.parse(h_acked); + handle_incoming_h(stream, h_outbound); + } 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")); } |