Skip to content

Commit 1deb82d

Browse files
authored
Update editor_client.dart
1 parent 82ac072 commit 1deb82d

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

packages/devtools_app/lib/src/shared/editor/editor_client.dart

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -319,27 +319,6 @@ class EditorClient extends DisposableController
319319
}
320320
}
321321

322-
Future<bool> isClientClosed() async {
323-
try {
324-
// Make an empty request to DTD.
325-
await _dtd.call('', '');
326-
} on StateError catch (e) {
327-
// TODO(https://github.com/flutter/devtools/issues/9028): Replace with a
328-
// check for whether DTD is closed. Requires a change to package:dtd.
329-
//
330-
// This is only a temporary fix. If the error in package:json_rpc_2 is
331-
// changed, this will no longer catch it. See:
332-
// https://github.com/dart-lang/tools/blob/b55643dadafd3ac6b2bd20823802f75929ebf98e/pkgs/json_rpc_2/lib/src/client.dart#L151
333-
if (e.message.contains('The client is closed.')) {
334-
return true;
335-
}
336-
} catch (e) {
337-
// Ignore other exceptions. If the client is open, we expect this to fail
338-
// with the error: 'Unknown method "."'.
339-
}
340-
return false;
341-
}
342-
343322
Future<DTDResponse> _call(
344323
EditorMethod method, {
345324
Map<String, Object?>? params,

0 commit comments

Comments
 (0)