mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-11-22 10:12:19 +00:00
Concurrency Modification Error Fixed
We were getting a concurrency Modification error on the treemap because multiple operations may have been accessing the RoutingTable's getAllNodes() method at once. - Fixed it by making this method synchronized.
This commit is contained in:
parent
0ce64529c6
commit
cb42c507de
@ -183,7 +183,7 @@ public class RoutingTable implements KadRoutingTable
|
|||||||
* @return List A List of all Nodes in this RoutingTable
|
* @return List A List of all Nodes in this RoutingTable
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final List getAllNodes()
|
public synchronized final List getAllNodes()
|
||||||
{
|
{
|
||||||
List<Node> nodes = new ArrayList<>();
|
List<Node> nodes = new ArrayList<>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user