Skip to content

Commit b207aa2

Browse files
authored
Merge pull request #87 from juanfem/issue_86
Fixing #86
2 parents 1c723df + 87e989a commit b207aa2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pvAccessJava/src/org/epics/pvaccess/client/impl/remote/ClientContextImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.net.NetworkInterface;
2222
import java.net.SocketException;
2323
import java.nio.channels.SocketChannel;
24+
import java.util.ArrayList;
2425
import java.util.Collections;
2526
import java.util.HashMap;
2627
import java.util.LinkedHashMap;
@@ -545,7 +546,7 @@ private void internalDestroy() {
545546
*/
546547
private void destroyAllChannels() {
547548
synchronized (channelsByCID) {
548-
for (Channel channel : channelsByCID.values()) {
549+
for (Channel channel : new ArrayList<>(channelsByCID.values())) {
549550
try {
550551
channel.destroy();
551552
} catch (Exception e) {

0 commit comments

Comments
 (0)