mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Copy managers list to prevent ConcurrentModificationException
This commit is contained in:
parent
16bf7af297
commit
c9928043b2
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue