From 08b4fd694228fe8e39ef3961ce942d037b8f6e57 Mon Sep 17 00:00:00 2001 From: hackrush Date: Sun, 12 Aug 2018 17:15:51 +0530 Subject: [PATCH] stop listening port only if it is not None --- lbrynet/daemon/auth/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/daemon/auth/server.py b/lbrynet/daemon/auth/server.py index 422dcd0cb..e08562fb8 100644 --- a/lbrynet/daemon/auth/server.py +++ b/lbrynet/daemon/auth/server.py @@ -256,7 +256,8 @@ class AuthJSONRPCServer(AuthorizedBase): # ignore INT/TERM signals once shutdown has started signal.signal(signal.SIGINT, self._already_shutting_down) signal.signal(signal.SIGTERM, self._already_shutting_down) - self.listening_port.stopListening() + if self.listening_port: + self.listening_port.stopListening() self.looping_call_manager.shutdown() if self.analytics_manager: self.analytics_manager.shutdown()