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 <[email protected]>
1 parent 7cd7458 commit f846232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)