We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1c723df + 87e989a commit b207aa2Copy full SHA for b207aa2
pvAccessJava/src/org/epics/pvaccess/client/impl/remote/ClientContextImpl.java
@@ -21,6 +21,7 @@
21
import java.net.NetworkInterface;
22
import java.net.SocketException;
23
import java.nio.channels.SocketChannel;
24
+import java.util.ArrayList;
25
import java.util.Collections;
26
import java.util.HashMap;
27
import java.util.LinkedHashMap;
@@ -545,7 +546,7 @@ private void internalDestroy() {
545
546
*/
547
private void destroyAllChannels() {
548
synchronized (channelsByCID) {
- for (Channel channel : channelsByCID.values()) {
549
+ for (Channel channel : new ArrayList<>(channelsByCID.values())) {
550
try {
551
channel.destroy();
552
} catch (Exception e) {
0 commit comments