Index: runtime/bin/socket_patch.dart |
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
index 9f487d4700e86b5854f5fb4ffdd3aa200ab5440c..a0de4fd122c9b5aa03405d85c8deaac8fe312b1a 100644 |
--- a/runtime/bin/socket_patch.dart |
+++ b/runtime/bin/socket_patch.dart |
@@ -821,7 +821,7 @@ class _RawSocket extends Stream<RawSocketEvent> |
if (data == null || data.length < available) { |
// Reading less than available from a Mac OS terminal indicate Ctrl-D. |
// This is interpreted as read closed. |
- runAsync(() => _controller.add(RawSocketEvent.READ_CLOSED)); |
+ scheduleMicrotask(() => _controller.add(RawSocketEvent.READ_CLOSED)); |
} |
return data; |
} else { |