mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Move out_buf in the try method
This commit is contained in:
parent
05ced7610e
commit
eee9796428
@ -188,6 +188,7 @@ class Server:
|
||||
servers_helper.set_waiting_start(self.server_id, False)
|
||||
try:
|
||||
self.process = pexpect.spawn(self.server_command, cwd=self.server_path, timeout=None, encoding='utf-8')
|
||||
out_buf = ServerOutBuf(self.process, self.server_id)
|
||||
except Exception as ex:
|
||||
msg = "Server {} failed to start with error code: {}".format(self.name, ex)
|
||||
logger.error(msg)
|
||||
@ -209,8 +210,6 @@ class Server:
|
||||
'error': translation.translate('error', 'internet')
|
||||
})
|
||||
|
||||
out_buf = ServerOutBuf(self.process, self.server_id)
|
||||
|
||||
logger.debug('Starting virtual terminal listener for server {}'.format(self.name))
|
||||
threading.Thread(target=out_buf.check, daemon=True, name='{}_virtual_terminal'.format(self.server_id)).start()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user