[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/master] Delete service instance during shutdown
commit 21645db1a39631276b69504cfde43f242360bdeb
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date: Wed Apr 29 14:46:58 2020 -0400
Delete service instance during shutdown
Before we were calling a non-existent shutdown function. These instances
already have __del__ functions so we can just call those instead.
---
gettor/services/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gettor/services/__init__.py b/gettor/services/__init__.py
index a99bf3b..bb87d49 100644
--- a/gettor/services/__init__.py
+++ b/gettor/services/__init__.py
@@ -57,7 +57,7 @@ class BaseService(internet.TimerService):
"""
log.info("SERVICE:: Stopping {} service.".format(self.name))
log.debug("SERVICE:: Calling shutdown on {}".format(self.name))
- self.instance.shutdown()
+ del self.instance
log.debug("SERVICE:: Shutdown for {} done".format(self.name))
internet.TimerService.stopService(self)
log.info("SERVICE:: Service stopped.")
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits