Merge branch 'fix_shutdown_from_gui' of https://github.com/mig5/onionshare into mig5-fix_shutdown_from_gui

This commit is contained in:
Micah Lee 2017-05-24 14:00:50 -07:00
commit 3e329b1bac
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -394,4 +394,7 @@ def stop(port):
s.connect(('127.0.0.1', port))
s.sendall('GET /{0:s}/shutdown HTTP/1.1\r\n\r\n'.format(shutdown_slug))
except:
pass
try:
urlopen('http://127.0.0.1:{0:d}/{1:s}/shutdown'.format(port, shutdown_slug)).read()
except:
pass