helper: Fix NDN stack initialization when using VisualSimulatorImpl
Change-Id: Ide284d87a0d06c11a7191fdea5b58169392281a2
diff --git a/examples/ndn-simple.cpp b/examples/ndn-simple.cpp
index 913c16f..0e84b4d 100644
--- a/examples/ndn-simple.cpp
+++ b/examples/ndn-simple.cpp
@@ -82,7 +82,8 @@
// Consumer will request /prefix/0, /prefix/1, ...
consumerHelper.SetPrefix("/prefix");
consumerHelper.SetAttribute("Frequency", StringValue("10")); // 10 interests a second
- consumerHelper.Install(nodes.Get(0)); // first node
+ auto apps = consumerHelper.Install(nodes.Get(0)); // first node
+ apps.Stop(Seconds(10.0)); // stop the consumer app at 10 seconds mark
// Producer
ndn::AppHelper producerHelper("ns3::ndn::Producer");