Skip to content

Commit

Permalink
Use poll() instead of select()
Browse files Browse the repository at this point in the history
Fixes docker#2278
because poll does not have select's builtin limit of 1024 descriptors

Signed-off-by: Jan Bieron <jbieron+github@gmail.com>
  • Loading branch information
bieron committed Apr 4, 2019
1 parent 5e8b1c0 commit 2953fb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/utils/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def read(socket, n=4096):
recoverable_errors = (errno.EINTR, errno.EDEADLK, errno.EWOULDBLOCK)

if six.PY3 and not isinstance(socket, NpipeSocket):
select.select([socket], [], [])
poll = select.poll()
poll.register(socket)
poll.poll()

try:
if hasattr(socket, 'recv'):
Expand Down

0 comments on commit 2953fb6

Please sign in to comment.