Index: runtime/bin/vmservice/server.dart |
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart |
index 1f807e7ad7a23c295c191bbe3ef7155f6e2ba347..a672bf23ce7aaa3787b77ae84e5455ed0e45b719 100644 |
--- a/runtime/bin/vmservice/server.dart |
+++ b/runtime/bin/vmservice/server.dart |
@@ -40,6 +40,10 @@ class WebSocketClient extends Client { |
} |
void post(dynamic result) { |
+ if (result == null) { |
+ // Do nothing. |
+ return; |
+ } |
try { |
socket.add(result); |
} catch (_) { |
@@ -65,6 +69,10 @@ class HttpRequestClient extends Client { |
: super(service, sendEvents:false); |
void post(String result) { |
+ if (result == null) { |
+ close(); |
+ return; |
+ } |
request.response..headers.contentType = jsonContentType |
..write(result) |
..close(); |