From 0e837c94ea090b6eb4b9bc65428ec28fd75d1d72 Mon Sep 17 00:00:00 2001 From: 1zuna Date: Tue, 12 Mar 2024 08:09:27 +0100 Subject: [PATCH] fix: shutdown cause concurrent modification --- java/org/cef/CefClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/cef/CefClient.java b/java/org/cef/CefClient.java index 39034ea6..707bb290 100644 --- a/java/org/cef/CefClient.java +++ b/java/org/cef/CefClient.java @@ -15,6 +15,7 @@ import java.awt.*; import java.nio.ByteBuffer; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Vector; @@ -498,7 +499,7 @@ private void cleanupBrowser(int identifier) { browser_.remove(identifier); } else if (!browser_.isEmpty()) { // Close all browsers. - Collection browserList = browser_.values(); + Collection browserList = new ArrayList<>(browser_.values()); for (CefBrowser browser : browserList) { browser.close(true); }