Skip to content

Commit

Permalink
api: avoid socket timeouts when executing commands (#3125)
Browse files Browse the repository at this point in the history
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 <loic.leyendecker@gmail.com>
  • Loading branch information
loicleyendecker authored May 11, 2023
1 parent 9cadad0 commit c5e582c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker/utils/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def read(socket, n=4096):
select.select([socket], [], [])
else:
poll = select.poll()
poll.register(socket)
poll.register(socket, select.POLLIN | select.POLLPRI)
poll.poll()

try:
Expand Down

0 comments on commit c5e582c

Please sign in to comment.