| 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);
|
|
|