mirror of
https://github.com/retspen/webvirtcloud
synced 2024-10-31 19:44:16 +00:00
Merge pull request #608 from fathonix/master
Fix errors that prevent socketiod from running
This commit is contained in:
commit
ce8432ce9e
2 changed files with 9 additions and 4 deletions
|
@ -176,7 +176,7 @@ def connect(sid, environ):
|
||||||
if child_pid:
|
if child_pid:
|
||||||
# already started child process, don't start another
|
# already started child process, don't start another
|
||||||
# write a new line so that when a client refresh the shell prompt is printed
|
# write a new line so that when a client refresh the shell prompt is printed
|
||||||
fd.write("\n")
|
os.write(fd, str.encode("\n"))
|
||||||
return
|
return
|
||||||
|
|
||||||
# create child process attached to a pty we can read from and write to
|
# create child process attached to a pty we can read from and write to
|
||||||
|
@ -200,8 +200,13 @@ def disconnect(sid):
|
||||||
global child_pid
|
global child_pid
|
||||||
|
|
||||||
# kill pty process
|
# kill pty process
|
||||||
os.kill(child_pid, signal.SIGKILL)
|
try:
|
||||||
os.wait()
|
os.kill(child_pid, signal.SIGKILL)
|
||||||
|
os.wait()
|
||||||
|
except ProcessLookupError:
|
||||||
|
pass
|
||||||
|
except ChildProcessError:
|
||||||
|
pass
|
||||||
|
|
||||||
# reset the variables
|
# reset the variables
|
||||||
fd = None
|
fd = None
|
||||||
|
|
|
@ -201,7 +201,7 @@ WS_PUBLIC_PATH = "/novncd/"
|
||||||
WS_CERT = None
|
WS_CERT = None
|
||||||
|
|
||||||
SOCKETIO_PORT = 6081
|
SOCKETIO_PORT = 6081
|
||||||
SOCKETIO_HOST = '0.0.0.0'
|
SOCKETIO_HOST = "0.0.0.0"
|
||||||
|
|
||||||
# Socketio public host
|
# Socketio public host
|
||||||
SOCKETIO_PUBLIC_HOST = None
|
SOCKETIO_PUBLIC_HOST = None
|
||||||
|
|
Loading…
Reference in a new issue