commit | 93cbb72d95b7229a4065c9d932f6542efcbe3f4d | [log] [tgz] |
---|---|---|
author | Jason Macnak <natsu@google.com> | Wed Apr 22 21:55:49 2020 +0000 |
committer | Jason Macnak <natsu@google.com> | Thu Apr 23 17:57:30 2020 +0000 |
tree | 08c3828419b77eaf8e1bbb748a2fadc8c295a10a | |
parent | 683adf95cd435d63cbfb860e979bab467d7c6253 [diff] |
Handle write failures in hwc broadcast loop Bug: b/154745183 Test: n/a (cherry picked from commit 6c1c24c89faa66b8f606755933ffbc36622cbc4f) Change-Id: I1ae3067989b76be40f40a6a56a295d59f73eefe7
diff --git a/guest/hals/hwcomposer/cutf_cvm/vsocket_screen_view.cpp b/guest/hals/hwcomposer/cutf_cvm/vsocket_screen_view.cpp index b67544c..16185b5 100644 --- a/guest/hals/hwcomposer/cutf_cvm/vsocket_screen_view.cpp +++ b/guest/hals/hwcomposer/cutf_cvm/vsocket_screen_view.cpp
@@ -106,6 +106,10 @@ auto buff = static_cast<char*>(GetBuffer(current_offset)); while (size > 0) { auto written = screen_server_->Write(buff, size); + if (written == -1) { + ALOGE("Broadcaster thread failed to write frame: %s", strerror(errno)); + break; + } size -= written; buff += written; }