mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-01 02:36:14 -05:00
Fix CLI to exit when server is shutdown
This commit is contained in:
parent
381d046a94
commit
f2cd447a58
@ -261,8 +261,9 @@ def main():
|
||||
|
||||
# wait for app to close
|
||||
try:
|
||||
while True:
|
||||
time.sleep(0.5)
|
||||
while t.is_alive():
|
||||
# t.join() can't catch KeyboradInterrupt in such as Ubuntu
|
||||
t.join(0.5)
|
||||
except KeyboardInterrupt:
|
||||
web.stop(app.port)
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user