mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-28 00:55:40 -04:00
waits for hidden service before displaying URL. fixes #116
This commit is contained in:
parent
36914114f9
commit
846b10b755
5 changed files with 50 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
from __future__ import division
|
||||
import os, sys, subprocess, inspect, platform, argparse, threading, time, math, inspect, platform, urllib2
|
||||
import os, sys, subprocess, inspect, platform, argparse, threading, time, math, inspect, platform
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
import common
|
||||
|
@ -101,11 +101,7 @@ class OnionShareGui(QtGui.QWidget):
|
|||
t.start()
|
||||
|
||||
def stop_server(self):
|
||||
# to stop flask, load http://127.0.0.1:<port>/<shutdown_slug>/shutdown
|
||||
try:
|
||||
urllib2.urlopen('http://127.0.0.1:{0}/{1}/shutdown'.format(self.app.port, web.shutdown_slug)).read()
|
||||
except:
|
||||
pass
|
||||
web.stop()
|
||||
self.app.cleanup()
|
||||
self.stop_server_finished.emit()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue