From 6826e5d612848a6c94b73d9d1cc54250ee0f17b5 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 3 Aug 2019 13:15:28 +0100 Subject: [PATCH] monkeyfarmer: Make polling even more robust Signed-off-by: Daniel Silverstone --- test/monkeyfarmer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/monkeyfarmer.py b/test/monkeyfarmer.py index a26e28dd4..dcc32175f 100644 --- a/test/monkeyfarmer.py +++ b/test/monkeyfarmer.py @@ -148,10 +148,10 @@ class MonkeyFarmer(asyncore.dispatcher): asyncore.loop(timeout=next_event - now, count=1) else: asyncore.loop(count=1) - if len(self.lines) > 0: + while len(self.lines) > 0: self.monkey_says(self.lines.pop(0)) - if once: - break + if once or self.deadmonkey: + return class Browser: