Allow shutting down while starting I2P listener

This commit is contained in:
Lee Miller 2023-08-10 03:52:16 +03:00
parent 761c95d561
commit e8dc62f08b
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -17,6 +17,8 @@ class I2PController(I2PThread):
self.nick = b'MiNode_' + base64.b16encode(os.urandom(4)).lower() self.nick = b'MiNode_' + base64.b16encode(os.urandom(4)).lower()
while True: while True:
if state.shutting_down:
return
try: try:
self.s = socket.create_connection((self.host, self.port)) self.s = socket.create_connection((self.host, self.port))
break break