mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-24 13:45:01 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user