aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-04-08 12:19:11 +0200
committerfiaxh <git@lightrise.org>2021-04-08 12:19:11 +0200
commitaeeda76c9252ab03c1b91c879e6d890801b0ba2e (patch)
tree8b16913d36997b0d26ccf1068d062ba5dddcdbf0 /xmpp-vala/src/module
parenta91cada4fb652b58d162f69c087a6e1d62619ecc (diff)
downloaddino-aeeda76c9252ab03c1b91c879e6d890801b0ba2e.tar.gz
dino-aeeda76c9252ab03c1b91c879e6d890801b0ba2e.zip
StreamManagement: Fix HashMap potentially being altered while being itterated
Diffstat (limited to 'xmpp-vala/src/module')
-rw-r--r--xmpp-vala/src/module/xep/0198_stream_management.vala2
1 files changed, 1 insertions, 1 deletions
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<int>();
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);
}
}