mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-30 12:34:18 +01:00
Copy managers list to prevent ConcurrentModificationException
This commit is contained in:
@@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -124,7 +125,7 @@ public class MultiAccountManagerImpl implements MultiAccountManager {
|
||||
@Override
|
||||
public void close() {
|
||||
synchronized (managers) {
|
||||
for (var m : managers) {
|
||||
for (var m : new ArrayList<>(managers)) {
|
||||
try {
|
||||
m.close();
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user