mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-11 12:18:54 -05:00
Fix CLI version to automatically exit when the server is shut down.
This commit is contained in:
parent
7b666654f3
commit
e33cfd621d
@ -254,14 +254,11 @@ def main():
|
|||||||
print strings._("ctrlc_to_stop")
|
print strings._("ctrlc_to_stop")
|
||||||
|
|
||||||
# wait for app to close
|
# wait for app to close
|
||||||
running = True
|
|
||||||
while running:
|
|
||||||
try:
|
try:
|
||||||
time.sleep(0.5)
|
t.join()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
running = False
|
web.stop(app.port)
|
||||||
web.stop()
|
finally:
|
||||||
|
|
||||||
# shutdown
|
# shutdown
|
||||||
app.cleanup()
|
app.cleanup()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user