1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-14 09:25:19 +00:00

Compare commits

...

4 commits

Author SHA1 Message Date
catborise
ce8432ce9e
Merge pull request #608 from fathonix/master
Fix errors that prevent socketiod from running
2023-09-27 20:34:15 +03:00
Aldo Adirajasa Fathoni
64fdb9315d
Fix socketio default host
The previous value caused webvirtcloud to
try to connect to socketiod with 0.0.0.0.
2023-09-26 21:56:27 +07:00
Aldo Adirajasa Fathoni
84e22e4a8c
Ignore if pty process has exited 2023-09-26 13:23:20 +07:00
Aldo Adirajasa Fathoni
3ef0fe19f8
Fix calling write() from int instead of os 2023-09-26 13:21:02 +07:00
2 changed files with 9 additions and 4 deletions

View file

@ -176,7 +176,7 @@ def connect(sid, environ):
if child_pid:
# already started child process, don't start another
# 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
# create child process attached to a pty we can read from and write to
@ -200,8 +200,13 @@ def disconnect(sid):
global child_pid
# kill pty process
os.kill(child_pid, signal.SIGKILL)
os.wait()
try:
os.kill(child_pid, signal.SIGKILL)
os.wait()
except ProcessLookupError:
pass
except ChildProcessError:
pass
# reset the variables
fd = None

View file

@ -201,7 +201,7 @@ WS_PUBLIC_PATH = "/novncd/"
WS_CERT = None
SOCKETIO_PORT = 6081
SOCKETIO_HOST = '0.0.0.0'
SOCKETIO_HOST = "0.0.0.0"
# Socketio public host
SOCKETIO_PUBLIC_HOST = None