Fix 'SocketIO' object has no attribute 'sendall' error

The Docker exec socket wrapper doesn't expose the sendall method directly.
This fix accesses the underlying socket via the _sock attribute when available,
with a fallback for direct socket objects.

https://claude.ai/code/session_01B9dpKXH8wbD7MPtPBDHrjq
This commit is contained in:
Claude
2026-01-31 01:03:58 +00:00
parent 1ddc553936
commit 21e2b7dcf7

View File

@@ -575,7 +575,12 @@ def handle_input(data):
# Send input to the container
sock = exec_instance.output
sock.sendall(input_data.encode('utf-8'))
# Access the underlying socket for sendall method
if hasattr(sock, '_sock'):
sock._sock.sendall(input_data.encode('utf-8'))
else:
# Fallback for direct socket objects
sock.sendall(input_data.encode('utf-8'))
except Exception as e:
logger.error(f"Error sending input: {e}", exc_info=True)