remove unused completer (#58804)

This commit is contained in:
Jonah Williams
2020-06-05 11:53:01 -07:00
committed by GitHub
parent 1e4d9f8502
commit 72f81f4167

View File

@@ -338,17 +338,11 @@ Future<vm_service.VmService> _connect(
}) async {
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);
// 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(
channel,
channel.add,
log: null,
disposeHandler: () async {
if (!streamClosedCompleter.isCompleted) {
streamClosedCompleter.complete();
}
await channel.close();
},
);