Skip to content

Commit

Permalink
Logs failed Brunet address and only creates new one if no address is …
Browse files Browse the repository at this point in the history
…given
  • Loading branch information
pstjuste committed Aug 6, 2013
1 parent a613c7a commit b3c20d5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Brunet/Applications/BasicNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,12 @@ public virtual ApplicationNode CreateNode(NodeConfig node_config) {
AHAddress address = null;
try {
address = (AHAddress) AddressParser.Parse(node_config.NodeAddress);
} catch {
address = Utils.GenerateAHAddress();
} catch (Exception e) {
ProtocolLog.Write(ProtocolLog.Exceptions, e.ToString());
// Only create new address if no address is given
if (node_config.NodeAddress == null) {
address = Utils.GenerateAHAddress();
}
}

// Create the Node state
Expand Down

0 comments on commit b3c20d5

Please sign in to comment.