1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

[core] Improve how the selected keys are copied in SmackReactor

This commit is contained in:
Florian Schmaus 2023-12-06 20:56:03 +01:00
parent 844ebbf4c5
commit 9acee05e5e

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2018-2020 Florian Schmaus
* Copyright 2018-2023 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -276,8 +276,7 @@ public class SmackReactor {
setInterestOpsCancelledKeySafe(selectionKey, 0);
}
selectedKeys = new ArrayList<>(selectedKeySet.size());
selectedKeys.addAll(selectedKeySet);
selectedKeys = new ArrayList<>(selectedKeySet);
selectedKeySet.clear();
}