Skip to content

Commit

Permalink
Fix select.select() expectional never reached in the dns ux socket se…
Browse files Browse the repository at this point in the history
…rver
  • Loading branch information
cvaroqui committed May 31, 2023
1 parent c57cce2 commit ddf3f88
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions opensvc/daemon/dns.py
Expand Up @@ -199,13 +199,12 @@ def recv(self, conn):
sep = "\n"
chunks = []
while True:
chunk = None
ready = select.select([conn], [], [conn], 1)
if ready[0]:
chunk = conn.recv(1024)
else:
break
if ready[2]:
break
elif ready[2]:
raise socket.error
if not chunk:
break
chunks.append(chunk)
Expand Down

0 comments on commit ddf3f88

Please sign in to comment.