Unverified Commit a009d711 authored by Ben Konyi's avatar Ben Konyi Committed by GitHub

Updated flutter_driver to support auth codes (#31310)

parent 3764cb85
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment