diff --git a/xmpp-vala/src/module/xep/0198_stream_management.vala b/xmpp-vala/src/module/xep/0198_stream_management.vala index b9185808..e053f3fb 100644 --- a/xmpp-vala/src/module/xep/0198_stream_management.vala +++ b/xmpp-vala/src/module/xep/0198_stream_management.vala @@ -179,11 +179,11 @@ public class Module : XmppStreamNegotiationModule, WriteNodeFunc { var remove_nrs = new ArrayList(); foreach (int nr in in_flight_stanzas.keys) { if (nr <= h) { - in_flight_stanzas[nr].promise.set_value(null); remove_nrs.add(nr); } } foreach (int nr in remove_nrs) { + in_flight_stanzas[nr].promise.set_value(null); in_flight_stanzas.unset(nr); } }