mirror of https://github.com/docker/docker-py.git
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>
This commit is contained in:
parent
9cadad009e
commit
c5e582c413
|
|
@ -37,7 +37,7 @@ def read(socket, n=4096):
|
||||||
select.select([socket], [], [])
|
select.select([socket], [], [])
|
||||||
else:
|
else:
|
||||||
poll = select.poll()
|
poll = select.poll()
|
||||||
poll.register(socket)
|
poll.register(socket, select.POLLIN | select.POLLPRI)
|
||||||
poll.poll()
|
poll.poll()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue