Commit bafc17e
committed
Fix
The ConcurrentModificationException happens because the player leave
procedure alters the `specPlayers` set, and this is the set we iterate
during the automatic spectator kicking procedure. By making a copy of
the set and iterating the copy, we circumvent this problem. Java 101,
really, but when the code is stateful and complex, it's "fair enough"
that it slipped through the cracks. It's also impossible to reproduce
without at least two players, so go figure...
Fixes #802auto-leave-on-end: true error.1 parent b4db449 commit bafc17e
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| |||
0 commit comments