Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Unified Diff: runtime/bin/vmservice/observatory/lib/service_common.dart

Issue 575853002: Add tools/ddbg_service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/vmservice/observatory/lib/service_common.dart
diff --git a/runtime/bin/vmservice/observatory/lib/service_common.dart b/runtime/bin/vmservice/observatory/lib/service_common.dart
index 1354888d7fecdb525abc06a5877e2e21457ee26e..b4601747ec36fded83c8ab109f93fbbcca46bf65 100644
--- a/runtime/bin/vmservice/observatory/lib/service_common.dart
+++ b/runtime/bin/vmservice/observatory/lib/service_common.dart
@@ -87,6 +87,7 @@ abstract class CommonWebSocketVM extends VM {
new Map<String, _WebSocketRequest>();
int _requestSerial = 0;
bool _hasInitiatedConnect = false;
+ bool _hasFinishedConnect = false;
Utf8Decoder _utf8Decoder = new Utf8Decoder();
CommonWebSocket _webSocket;
@@ -96,6 +97,7 @@ abstract class CommonWebSocketVM extends VM {
}
void _notifyConnect() {
+ _hasFinishedConnect = true;
if (!_connected.isCompleted) {
Logger.root.info('WebSocketVM connection opened: ${target.networkAddress}');
_connected.complete(this);
@@ -103,6 +105,9 @@ abstract class CommonWebSocketVM extends VM {
}
Future get onConnect => _connected.future;
void _notifyDisconnect() {
+ if (!_hasFinishedConnect) {
+ return;
+ }
if (!_disconnected.isCompleted) {
Logger.root.info('WebSocketVM connection error: ${target.networkAddress}');
_disconnected.complete(this);

Powered by Google App Engine
This is Rietveld 408576698