Skip to content

Commit

Permalink
Fix LocalNode (neo-project#1616)
Browse files Browse the repository at this point in the history
* Remove ProtocolSettings Initialize

* Revert "Remove ProtocolSettings Initialize"

This reverts commit 58dda0b.

* Avoid calling ProtocolSettings.Default in multiple threads

Co-authored-by: Jin Qiao <[email protected]>
  • Loading branch information
2 people authored and Tommo-L committed Jun 22, 2020
1 parent c044562 commit 021b5f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/neo/Network/P2P/LocalNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public LocalNode(NeoSystem system)
singleton = this;

// Start dns resolution in parallel

for (int i = 0; i < ProtocolSettings.Default.SeedList.Length; i++)
string[] seedList = ProtocolSettings.Default.SeedList;
for (int i = 0; i < seedList.Length; i++)
{
int index = i;
Task.Run(() => SeedList[index] = GetIpEndPoint(ProtocolSettings.Default.SeedList[index]));
Task.Run(() => SeedList[index] = GetIpEndPoint(seedList[index]));
}
}
}
Expand Down

0 comments on commit 021b5f2

Please sign in to comment.