From fee1d495634c302c065632cfe56cba5f05774434 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Wed, 14 Mar 2018 08:33:25 -0700 Subject: [PATCH] Fix bug with shutdown_slug --- onionshare/web.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onionshare/web.py b/onionshare/web.py index 4a6b8c71..ca0bd044 100644 --- a/onionshare/web.py +++ b/onionshare/web.py @@ -350,7 +350,7 @@ class Web(object): """ Stop the flask web server, from the context of an http request. """ - self.check_slug_candidate(slug_candidate, shutdown_slug) + self.check_slug_candidate(slug_candidate, self.shutdown_slug) self.force_shutdown() return "" @@ -472,10 +472,10 @@ class Web(object): try: s = socket.socket() s.connect(('127.0.0.1', port)) - s.sendall('GET /{0:s}/shutdown HTTP/1.1\r\n\r\n'.format(shutdown_slug)) + s.sendall('GET /{0:s}/shutdown HTTP/1.1\r\n\r\n'.format(self.shutdown_slug)) except: try: - urlopen('http://127.0.0.1:{0:d}/{1:s}/shutdown'.format(port, shutdown_slug)).read() + urlopen('http://127.0.0.1:{0:d}/{1:s}/shutdown'.format(port, self.shutdown_slug)).read() except: pass