mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Break out of loop for sockets in wait_for when there's no data to read
This commit is contained in:
parent
d80f4cee9d
commit
eb80bd1a56
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue