forked from shaba/openuds
Fixed 2.0 client bugs
This commit is contained in:
parent
9cd7e2f67b
commit
abc9622d53
@ -65,10 +65,11 @@ class Handler(SocketServer.BaseRequestHandler):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if self.thread.stoppable is True:
|
||||
self.thread.currentConnections -= 1
|
||||
|
||||
if self.thread.stoppable is True and self.thread.currentConnections == 0:
|
||||
self.thread.stop()
|
||||
|
||||
self.thread.currentConnections -= 1
|
||||
|
||||
class ForwardThread(threading.Thread):
|
||||
status = 0 # Connecting
|
||||
|
@ -65,7 +65,7 @@ def readTempFile(filename):
|
||||
|
||||
filename = os.path.join(tempfile.gettempdir(), filename)
|
||||
try:
|
||||
with open(filename, 'w') as f:
|
||||
with open(filename, 'r') as f:
|
||||
return f.read()
|
||||
except Exception:
|
||||
return None
|
||||
@ -129,7 +129,13 @@ def addTaskToWait(taks):
|
||||
|
||||
def waitForTasks():
|
||||
for t in _tasksToWait:
|
||||
t.wait()
|
||||
try:
|
||||
if hasattr(t, 'join'):
|
||||
t.join()
|
||||
elif hasattr(t, 'wait'):
|
||||
t.wait()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def addExecBeforeExit(fnc):
|
||||
|
Loading…
Reference in New Issue
Block a user