Improve socket handling for -x spawned fenrir instances.
This commit is contained in:
@@ -254,9 +254,6 @@ class driver(screenDriver):
|
||||
# Load configurable timeouts from settings
|
||||
self._load_pty_settings()
|
||||
|
||||
self.shortcutType = self.env["runtime"][
|
||||
"InputManager"
|
||||
].get_shortcut_type()
|
||||
self.env["runtime"]["ProcessManager"].add_custom_event_thread(
|
||||
self.terminal_emulation
|
||||
)
|
||||
@@ -403,31 +400,23 @@ class driver(screenDriver):
|
||||
}
|
||||
)
|
||||
break
|
||||
if self.shortcutType == "KEY":
|
||||
try:
|
||||
self.inject_text_to_screen(msg_bytes)
|
||||
except Exception as e:
|
||||
self.env["runtime"][
|
||||
"DebugManager"
|
||||
].write_debug_out(
|
||||
"ptyDriver getInputData: Error injecting text to screen: "
|
||||
+ str(e),
|
||||
debug.DebugLevel.ERROR,
|
||||
)
|
||||
event_queue.put(
|
||||
{
|
||||
"Type": FenrirEventType.stop_main_loop,
|
||||
"data": None,
|
||||
}
|
||||
)
|
||||
break
|
||||
else:
|
||||
try:
|
||||
self.inject_text_to_screen(msg_bytes)
|
||||
except Exception as e:
|
||||
self.env["runtime"][
|
||||
"DebugManager"
|
||||
].write_debug_out(
|
||||
"ptyDriver getInputData: Error injecting text to screen: "
|
||||
+ str(e),
|
||||
debug.DebugLevel.ERROR,
|
||||
)
|
||||
event_queue.put(
|
||||
{
|
||||
"Type": FenrirEventType.byte_input,
|
||||
"data": msg_bytes,
|
||||
"Type": FenrirEventType.stop_main_loop,
|
||||
"data": None,
|
||||
}
|
||||
)
|
||||
break
|
||||
# output
|
||||
if self.p_out in r:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user