Break out of loop for sockets in wait_for when there's no data to read

reviewable/pr18780/r1
James Cammarata 10 years ago
parent 1abf10a4f6
commit 1cc9b6d90b

@ -213,7 +213,9 @@ def main():
matched = False
while 1:
data += s.recv(1024)
if re.search(search_regex, data, re.MULTILINE):
if not data:
break
elif re.search(search_regex, data, re.MULTILINE):
matched = True
break
if matched:

Loading…
Cancel
Save