bug fix remote lenght

This commit is contained in:
2026-05-19 16:23:35 -03:00
parent 3ca6f497d1
commit 468868ac18
2 changed files with 8 additions and 3 deletions
+5 -2
View File
@@ -315,8 +315,11 @@ class node:
def _setup_interact_environment(self, debug=False, logger=None, async_mode=False): def _setup_interact_environment(self, debug=False, logger=None, async_mode=False):
size = re.search('columns=([0-9]+).*lines=([0-9]+)',str(os.get_terminal_size())) try:
self.child.setwinsize(int(size.group(2)),int(size.group(1))) size = re.search('columns=([0-9]+).*lines=([0-9]+)',str(os.get_terminal_size()))
self.child.setwinsize(int(size.group(2)),int(size.group(1)))
except OSError:
pass
if logger: if logger:
port_str = f":{self.port}" if self.port and self.protocol not in ["ssm", "kubectl", "docker"] else "" port_str = f":{self.port}" if self.port and self.protocol not in ["ssm", "kubectl", "docker"] else ""
logger("success", f"Connected to {self.unique} at {self.host}{port_str} via: {self.protocol}") logger("success", f"Connected to {self.unique} at {self.host}{port_str} via: {self.protocol}")
+3 -1
View File
@@ -375,7 +375,9 @@ class NodeServicer(connpy_pb2_grpc.NodeServiceServicer):
asyncio.run(n._async_interact_loop(remote_stream, resize_callback, copilot_handler=remote_copilot_handler)) asyncio.run(n._async_interact_loop(remote_stream, resize_callback, copilot_handler=remote_copilot_handler))
except Exception as e: except Exception as e:
pass import traceback
print(f"[ERROR in run_async_loop] {e}")
traceback.print_exc()
finally: finally:
n._teardown_interact_environment() n._teardown_interact_environment()
response_queue.put(None) # Signal EOF response_queue.put(None) # Signal EOF