Skip to content

Commit c5e582c

Browse files
api: avoid socket timeouts when executing commands (#3125)
Only listen to read events when polling a socket in order to avoid incorrectly trying to read from a socket that is not actually ready. Signed-off-by: Loïc Leyendecker <[email protected]>
1 parent 9cadad0 commit c5e582c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/utils/socket.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def read(socket, n=4096):
3737
select.select([socket], [], [])
3838
else:
3939
poll = select.poll()
40-
poll.register(socket)
40+
poll.register(socket, select.POLLIN | select.POLLPRI)
4141
poll.poll()
4242

4343
try:

0 commit comments

Comments
 (0)