Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public bool CreateNode(int nodeId, INodePacketFactory factory, NodeConfiguration
{
ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory));

if (_nodeContexts.Count == ComponentHost.BuildParameters.MaxNodeCount)
if (_nodeContexts.Count >= ComponentHost.BuildParameters.MaxNodeCount)
{
ErrorUtilities.ThrowInternalError("All allowable nodes already created ({0}).", _nodeContexts.Count);
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ internal bool CreateNode(HandshakeOptions hostContext, INodePacketFactory factor
ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory));
ErrorUtilities.VerifyThrow(!_nodeIdToPacketFactory.ContainsKey((int)hostContext), "We should not already have a factory for this context! Did we forget to call DisconnectFromHost somewhere?");

if (AvailableNodes == 0)
if (AvailableNodes <= 0)
{
ErrorUtilities.ThrowInternalError("All allowable nodes already created ({0}).", _nodeContexts.Count);
return false;
Expand Down