Unverified Commit 72f81f41 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

remove unused completer (#58804)

parent 1e4d9f85
...@@ -338,17 +338,11 @@ Future<vm_service.VmService> _connect( ...@@ -338,17 +338,11 @@ Future<vm_service.VmService> _connect(
}) async { }) async {
final Uri wsUri = httpUri.replace(scheme: 'ws', path: globals.fs.path.join(httpUri.path, 'ws')); final Uri wsUri = httpUri.replace(scheme: 'ws', path: globals.fs.path.join(httpUri.path, 'ws'));
final io.WebSocket channel = await _openChannel(wsUri.toString(), compression: compression); final io.WebSocket channel = await _openChannel(wsUri.toString(), compression: compression);
// Create an instance of the package:vm_service API in addition to the flutter
// tool's to allow gradual migration.
final Completer<void> streamClosedCompleter = Completer<void>();
final vm_service.VmService delegateService = vm_service.VmService( final vm_service.VmService delegateService = vm_service.VmService(
channel, channel,
channel.add, channel.add,
log: null, log: null,
disposeHandler: () async { disposeHandler: () async {
if (!streamClosedCompleter.isCompleted) {
streamClosedCompleter.complete();
}
await channel.close(); await channel.close();
}, },
); );
......
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