Skip to content

Commit

Permalink
apps: Reverse default shutdown order for applications managed by Mini…
Browse files Browse the repository at this point in the history
…-NDN

Change-Id: Id92d86070129efe3a51fe115e8c1d8b2c71e7be3
  • Loading branch information
awlane committed Feb 5, 2025
1 parent 739fc73 commit 8516386
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion minindn/apps/application.py
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down
11 changes: 7 additions & 4 deletions minindn/minindn.py
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 8516386

Please sign in to comment.