mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
[core] Improve how the selected keys are copied in SmackReactor
This commit is contained in:
parent
844ebbf4c5
commit
9acee05e5e
1 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2018-2020 Florian Schmaus
|
* Copyright 2018-2023 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -276,8 +276,7 @@ public class SmackReactor {
|
||||||
setInterestOpsCancelledKeySafe(selectionKey, 0);
|
setInterestOpsCancelledKeySafe(selectionKey, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedKeys = new ArrayList<>(selectedKeySet.size());
|
selectedKeys = new ArrayList<>(selectedKeySet);
|
||||||
selectedKeys.addAll(selectedKeySet);
|
|
||||||
selectedKeySet.clear();
|
selectedKeySet.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue