mirror of https://github.com/docker/docker-py.git
fix premature EOF detection in streams
The docker engine may send empty chunks of data in the stream (especially since https://github.com/docker/docker/pull/13033) They should not be taken for EOF Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr>
This commit is contained in:
parent
64dcd5a191
commit
e132909244
|
@ -233,7 +233,7 @@ class Client(requests.Session):
|
||||||
break
|
break
|
||||||
_, length = struct.unpack('>BxxxL', header)
|
_, length = struct.unpack('>BxxxL', header)
|
||||||
if not length:
|
if not length:
|
||||||
break
|
continue
|
||||||
data = response.raw.read(length)
|
data = response.raw.read(length)
|
||||||
if not data:
|
if not data:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue