Closed asvitkine closed 2 weeks ago
So this looks like something I tried to fix in https://github.com/triplea-game/triplea/pull/12054.
So the code does:
listeners.stream()
.filter(listener -> converted.messageTypeIs(listener.messageType))
.forEach(
listener ->
listener.listener.accept(
converted.getPayload(listener.messageType.getPayloadType())));
And hits a ConcurrentModificationException
.
But listeners is synchronized via:
private final Set<MessageListener<? extends WebSocketMessage>> listeners =
Collections.synchronizedSet(new HashSet<>());
So what's going on?
Reported here: https://forums.triplea-game.org/topic/2999/2-6-release-getting-close-need-volunteers-to-help-beta-test-2-6/170