Close response instead of derived socket. (#1260)

This commit is contained in:
Felix Fontein
2026-05-26 21:11:50 +02:00
committed by GitHub
parent 3bec6b2add
commit 5afe15ea50
4 changed files with 16 additions and 13 deletions
+2 -2
View File
@@ -303,7 +303,7 @@ class Connection(ConnectionBase):
data = {"Tty": False, "Detach": False}
if need_stdin:
exec_socket = self._call_client(
exec_socket, response = self._call_client(
lambda client: client.post_json_to_stream_socket(
"/exec/{0}/start", exec_id, data=data
)
@@ -356,7 +356,7 @@ class Connection(ConnectionBase):
stdout, stderr = exec_socket_handler.consume()
finally:
exec_socket.close()
response.close()
else:
stdout, stderr = self._call_client(
lambda client: client.post_json_to_stream(