[devicelab] allow the tool to use the word waiting more than once (#56397)

This commit is contained in:
Jonah Williams 2020-05-05 13:13:21 -07:00 committed by GitHub
parent 9b7b9d795e
commit f7ed942a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
.listen((String line) {
print('attach:stdout: $line');
stdout.add(line);
if (line.contains('Waiting') && onListening != null)
if (line.contains('Waiting') && onListening != null && !listening.isCompleted)
listening.complete(onListening());
if (line.contains('Quit (terminate the application on the device)'))
ready.complete();