Commit eb80bd1a by James Cammarata

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

parent d80f4cee
...@@ -213,7 +213,9 @@ def main(): ...@@ -213,7 +213,9 @@ def main():
matched = False matched = False
while 1: while 1:
data += s.recv(1024) 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 matched = True
break break
if matched: if matched:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment