File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/flutter_tools/lib/src Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,13 @@ class ProtocolDiscovery {
60
60
void _handleLine (String line) {
61
61
Uri uri;
62
62
63
- final RegExp r = new RegExp ('$serviceName (http://[^ \n ]+)' );
63
+ final RegExp r =
64
+ new RegExp ('${RegExp .escape (serviceName )} (.*) (http://[^ \n ]+)' );
64
65
final Match match = r.firstMatch (line);
65
66
66
67
if (match != null ) {
67
68
try {
68
- uri = Uri .parse (match[1 ]);
69
+ uri = Uri .parse (match[2 ]);
69
70
} catch (error) {
70
71
_stopScrapingLogs ();
71
72
_completer.completeError (error);
@@ -77,6 +78,9 @@ class ProtocolDiscovery {
77
78
_stopScrapingLogs ();
78
79
_completer.complete (_forwardPort (uri));
79
80
}
81
+
82
+ _stopScrapingLogs ();
83
+ _completer.completeError ('uri not found' );
80
84
}
81
85
82
86
Future <Uri > _forwardPort (Uri deviceUri) async {
You can’t perform that action at this time.
0 commit comments