helper: Fix NDN stack initialization when using VisualSimulatorImpl
Change-Id: Ide284d87a0d06c11a7191fdea5b58169392281a2
diff --git a/helper/ndn-app-helper.cpp b/helper/ndn-app-helper.cpp
index 0fe7f5c..fef02c8 100644
--- a/helper/ndn-app-helper.cpp
+++ b/helper/ndn-app-helper.cpp
@@ -23,6 +23,7 @@
#include "ns3/names.h"
#include "apps/ndn-app.hpp"
+#include "ndn-stack-helper.hpp"
#ifdef NS3_MPI
#include "ns3/mpi-interface.h"
@@ -96,8 +97,7 @@
app = m_factory.Create<Application>();
node->AddApplication(app);
}));
- Simulator::Stop(Seconds(0));
- Simulator::Run();
+ StackHelper::ProcessWarmupEvents();
return app;
}