_line_or_await *after* checking wait_fors so we don't match current line
This commit is contained in:
parent
45269a98a9
commit
f48aaded5a
1 changed files with 2 additions and 1 deletions
|
@ -192,7 +192,6 @@ class Server(IServer):
|
|||
await self._on_read_line(line)
|
||||
await self.line_read(line)
|
||||
|
||||
await self._line_or_wait(_line())
|
||||
for i, (aw, response, fut) in enumerate(self._wait_for):
|
||||
if response.match(self, line):
|
||||
fut.set_result(line)
|
||||
|
@ -200,6 +199,8 @@ class Server(IServer):
|
|||
await self._line_or_wait(aw)
|
||||
break
|
||||
|
||||
await self._line_or_wait(_line())
|
||||
|
||||
return both
|
||||
|
||||
async def wait_for(self, response: IMatchResponse) -> Line:
|
||||
|
|
Loading…
Reference in a new issue