[Pkg-privacy-commits] [onionshare] 213/256: Reinstate the alternative method of shutting down the web server - necessary for clicking 'Stop sharing' from GUI
Ulrike Uhlig
ulrike at moszumanska.debian.org
Fri May 26 12:53:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
ulrike pushed a commit to branch master
in repository onionshare.
commit 3641f376b7caa99389155a159620273d97decb67
Author: Miguel Jacq <mig at mig5.net>
Date: Sat May 20 17:37:12 2017 +1000
Reinstate the alternative method of shutting down the web server - necessary for clicking 'Stop sharing' from GUI
---
onionshare/web.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/onionshare/web.py b/onionshare/web.py
index 2ff60bd..a4abfcc 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -371,4 +371,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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git
More information about the Pkg-privacy-commits
mailing list