Skip to content

Commit 9e78d10

Browse files
ellietteCommit Queue
authored and
Commit Queue
committed
Add isClosed method to DTD
This allows the Property Editor to check if the DTD connection is still active and reconnect if not. Because Chrome puts inactive tabs to sleep, listening to the `done` Future is not sufficient, because it might be resolved while the tab is asleep. This will require a release of DTD for us to actually begin using it. Bug: flutter/devtools#9028 Change-Id: I72e55d0d1d54d3a6d07d34e5e3ac5cde9aca161d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416841 Reviewed-by: Derek Xu <[email protected]> Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Elliott Brooks <[email protected]>
1 parent 3ac32f1 commit 9e78d10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/dtd/lib/src/dart_tooling_daemon.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ class DartToolingDaemon {
7272
/// is terminated.
7373
Future<void> get done => _done;
7474

75+
/// Whether or not the connection is closed.
76+
bool get isClosed => _clientPeer.isClosed;
77+
7578
/// Registers this client as the handler for the [service].[method] service
7679
/// method.
7780
///

0 commit comments

Comments
 (0)