Skip to content

Instantly share code, notes, and snippets.

@ux
Created December 3, 2015 15:59
Show Gist options
  • Save ux/ac4fd45392aedb380903 to your computer and use it in GitHub Desktop.
Save ux/ac4fd45392aedb380903 to your computer and use it in GitHub Desktop.
diff --git a/docker/client.py b/docker/client.py
index d219472..1835da7 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -272,7 +272,14 @@ class Client(
def _stream_raw_result(self, response):
''' Stream result for TTY-enabled container above API 1.6 '''
+
+ socket = self._get_raw_response_socket(response)
+ if six.PY3:
+ socket._sock.settimeout(None)
+ else:
+ socket.settimeout(None)
+
self._raise_for_status(response)
+
for out in response.iter_content(chunk_size=1, decode_unicode=True):
yield out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment