mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Updated flutter_driver to support auth codes (#31310)
This commit is contained in:
parent
3764cb8515
commit
a009d71101
@ -937,8 +937,14 @@ void restoreVmServiceConnectFunction() {
|
||||
/// the [VMServiceClient].
|
||||
Future<VMServiceClientConnection> _waitAndConnect(String url) async {
|
||||
Uri uri = Uri.parse(url);
|
||||
final List<String> pathSegments = <String>[];
|
||||
// If there's an authentication code (default), we need to add it to our path.
|
||||
if (uri.pathSegments.isNotEmpty) {
|
||||
pathSegments.add(uri.pathSegments.first);
|
||||
}
|
||||
pathSegments.add('ws');
|
||||
if (uri.scheme == 'http')
|
||||
uri = uri.replace(scheme: 'ws', path: '/ws');
|
||||
uri = uri.replace(scheme: 'ws', pathSegments: pathSegments);
|
||||
int attempts = 0;
|
||||
while (true) {
|
||||
WebSocket ws1;
|
||||
|
Loading…
Reference in New Issue
Block a user