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 untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
1 changed files with 2 additions and 0 deletions

View File

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