Skip to content

Commit

Permalink
Fixed a tiny bug in StackConfig.cs.
Browse files Browse the repository at this point in the history
  • Loading branch information
bonesoul committed Sep 29, 2014
1 parent 9dc015b commit 3cf980b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/CoiniumServ/Server/Stack/StackConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#endregion
using System;
using System.Collections.Generic;
using JsonConfig;
using Serilog;

namespace CoiniumServ.Server.Stack
Expand All @@ -39,10 +40,14 @@ public StackConfig(dynamic config)
// load the config data.
Name = string.IsNullOrEmpty(config.name) ? "CoiniumServ.com" : config.name;

Nodes=new List<IStackNode>();
foreach (var entry in config.nodes)
Nodes = new List<IStackNode>();

if (!config.nodes is NullExceptionPreventer)
{
Nodes.Add(new StackNode(entry));
foreach (var entry in config.nodes)
{
Nodes.Add(new StackNode(entry));
}
}

Valid = true;
Expand Down

0 comments on commit 3cf980b

Please sign in to comment.