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 {
6060 void _handleLine (String line) {
6161 Uri uri;
6262
63- final RegExp r = new RegExp ('$serviceName (http://[^ \n ]+)' );
63+ final RegExp r =
64+ new RegExp ('${RegExp .escape (serviceName )} (.*) (http://[^ \n ]+)' );
6465 final Match match = r.firstMatch (line);
6566
6667 if (match != null ) {
6768 try {
68- uri = Uri .parse (match[1 ]);
69+ uri = Uri .parse (match[2 ]);
6970 } catch (error) {
7071 _stopScrapingLogs ();
7172 _completer.completeError (error);
@@ -77,6 +78,9 @@ class ProtocolDiscovery {
7778 _stopScrapingLogs ();
7879 _completer.complete (_forwardPort (uri));
7980 }
81+
82+ _stopScrapingLogs ();
83+ _completer.completeError ('uri not found' );
8084 }
8185
8286 Future <Uri > _forwardPort (Uri deviceUri) async {
You can’t perform that action at this time.
0 commit comments