Network timeout during replay

This commit is contained in:
Tim Young 2018-10-17 14:56:28 -05:00
parent 17b127d69d
commit 811339b176
2 changed files with 4 additions and 2 deletions

View File

@ -255,7 +255,7 @@ namespace EduNetworkBuilder
if (CanDo) if (CanDo)
{ {
ChangedComponent = (NetworkDevice)myNet.AddItem(newItemType, Location); ChangedComponent = (NetworkDevice)myNet.AddItem(newItemType, Location);
if (NB.DebugActions) { Console.WriteLine("Adding a Device: " + source.hostname); } if (NB.DebugActions && source != null) { Console.WriteLine("Adding a Device: " + source.hostname); }
} }
else else
{ {

View File

@ -1695,7 +1695,8 @@ namespace EduNetworkBuilder
NBSettings Settings = NB.GetSettings(); NBSettings Settings = NB.GetSettings();
ActionCollection AC = Settings.GetUserActionCollection(); ActionCollection AC = Settings.GetUserActionCollection();
ActionClass Success = AC.RunAction(NextReplayIndex++); ActionClass Success = AC.RunAction(NextReplayIndex++);
NextReplayAction = DateTime.UtcNow.AddMilliseconds(NB.MillisecondsBetweenReplays); NextReplayAction = DateTime.UtcNow.AddMilliseconds(NB.MillisecondsBetweenReplays);
DoAllAutoJoin(); //Connect network links if we need to do so DoAllAutoJoin(); //Connect network links if we need to do so
if(Success != null) if(Success != null)
@ -1703,6 +1704,7 @@ namespace EduNetworkBuilder
//we did something. keep replaying //we did something. keep replaying
NB.MarkToUpdate(); NB.MarkToUpdate();
StartedNewReplayAction = true; StartedNewReplayAction = true;
previously_had_packets = false; //This will make sure we reset packet counters
} }
else else
{ {