mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Merge branch 'kkka-cli-auto-exit'
This commit is contained in:
commit
5a5f1f0480
@ -254,16 +254,13 @@ def main():
|
||||
print strings._("ctrlc_to_stop")
|
||||
|
||||
# wait for app to close
|
||||
running = True
|
||||
while running:
|
||||
try:
|
||||
time.sleep(0.5)
|
||||
except KeyboardInterrupt:
|
||||
running = False
|
||||
web.stop(app.port)
|
||||
|
||||
# shutdown
|
||||
app.cleanup()
|
||||
try:
|
||||
t.join()
|
||||
except KeyboardInterrupt:
|
||||
web.stop(app.port)
|
||||
finally:
|
||||
# shutdown
|
||||
app.cleanup()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user