Skip to content

Commit

Permalink
Fix SeedList initialization (neo-project#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang authored and Luchuan committed Jan 10, 2020
1 parent e94f219 commit a3c4a94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/neo/Network/P2P/LocalNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ public LocalNode(NeoSystem system)
// Start dns resolution in parallel

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

Expand Down

0 comments on commit a3c4a94

Please sign in to comment.