Fix crash when no nodes are specified

This commit is contained in:
AeonLucid committed 2020-09-26 05:54:49 +02:00
1 parent f2a23d5bbb
commit 3c4c69cb19
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ Almost all standard features are implemented at this moment, except for public g
- [x] V2 GameCodes (AAAAAA)
- [x] Kick player
- [x] Ban player
- [ ] Server redirection
- [x] Server redirection
- [ ] Server reselect
## Installation
@@ -20,9 +20,12 @@ namespace Impostor.Server.Net.Redirector
_nodes = new List<IPEndPoint>();
_lock = new object();
foreach (var node in redirectorConfig.Value.Nodes)
if (redirectorConfig.Value.Nodes != null)
{
_nodes.Add(new IPEndPoint(IPAddress.Parse(node.Ip), node.Port));
foreach (var node in redirectorConfig.Value.Nodes)
{
_nodes.Add(new IPEndPoint(IPAddress.Parse(node.Ip), node.Port));
}
}
}