diff --git a/minindn/apps/application.py b/minindn/apps/application.py index 877a58b..d09e94f 100644 --- a/minindn/apps/application.py +++ b/minindn/apps/application.py @@ -1,6 +1,6 @@ # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ # -# Copyright (C) 2015-2019, The University of Memphis, +# Copyright (C) 2015-2025, The University of Memphis, # Arizona Board of Regents, # Regents of the University of California. # diff --git a/minindn/minindn.py b/minindn/minindn.py index ded6dbc..e597eaa 100644 --- a/minindn/minindn.py +++ b/minindn/minindn.py @@ -1,6 +1,6 @@ # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ # -# Copyright (C) 2015-2021, The University of Memphis, +# Copyright (C) 2015-2025, The University of Memphis, # Arizona Board of Regents, # Regents of the University of California. # @@ -227,12 +227,15 @@ def processTopo(topoFile): return topo - def start(self): + def start(self) -> None: self.net.start() time.sleep(3) - def stop(self): - for cleanup in self.cleanups: + def stop(self) -> None: + # We stop applications in the reversal of insertion order, which will + # implicitly prevent applications dependent on others closing early + # from errors (see: NLSR and NFD) + for cleanup in reversed(self.cleanups): cleanup() self.net.stop()