Skip to content

Commit f846232

Browse files
authored
socket: fix for errors on pipe close in Windows (#3099)
Need to return data, not size. By returning an empty string, EOF will be detected properly since `len()` will be `0`. Fixes #3098. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
1 parent 7cd7458 commit f846232

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docker/utils/socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def read(socket, n=4096):
4949
if is_pipe_ended:
5050
# npipes don't support duplex sockets, so we interpret
5151
# a PIPE_ENDED error as a close operation (0-length read).
52-
return 0
52+
return ''
5353
raise
5454

5555

0 commit comments

Comments
 (0)