da8ed2208e
Because we use `nonBlocking`, the stream closing with unflushed data can result in an unhandled exception. Since we're never interested in errors writing to the stream (there's nothing we can do if the output stream is closed, and it happens at the end of every session), we just discard the error. Fixes https://github.com/dart-lang/sdk/issues/61193 Fixes https://github.com/dart-lang/sdk/issues/55685 Fixes https://github.com/dart-lang/sdk/issues/55313 Change-Id: I6e0a332708cd6e8eb3ae8bd60d45c9e117d897a6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452440 Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Helin Shiah <helinx@google.com> Commit-Queue: Helin Shiah <helinx@google.com>