summaryrefslogtreecommitdiff
path: root/docker/utils/socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/utils/socket.py')
-rw-r--r--docker/utils/socket.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/utils/socket.py b/docker/utils/socket.py
index 54392d2..c3a5f90 100644
--- a/docker/utils/socket.py
+++ b/docker/utils/socket.py
@@ -59,7 +59,7 @@ def next_frame_size(socket):
try:
data = read_exactly(socket, 8)
except SocketError:
- return 0
+ return -1
_, actual = struct.unpack('>BxxxL', data)
return actual
@@ -71,7 +71,7 @@ def frames_iter(socket):
"""
while True:
n = next_frame_size(socket)
- if n == 0:
+ if n < 0:
break
while n > 0:
result = read(socket, n)