diff options
author | loicleyendecker <loicleyendecker@users.noreply.github.com> | 2023-05-11 18:36:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 13:36:37 -0400 |
commit | c5e582c413a4a3a9eff6ee8208d195f657ffda94 (patch) | |
tree | 5f443ccaee31d1a7d3ceedd5ca051923afb737f2 /docker/utils | |
parent | 9cadad009e6aa78e15d752e2011705d7d91b8d2e (diff) | |
download | docker-py-c5e582c413a4a3a9eff6ee8208d195f657ffda94.tar.gz |
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 <loic.leyendecker@gmail.com>
Diffstat (limited to 'docker/utils')
-rw-r--r-- | docker/utils/socket.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/utils/socket.py b/docker/utils/socket.py index 3c31a98..efb7458 100644 --- a/docker/utils/socket.py +++ b/docker/utils/socket.py @@ -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: |