Snap for 8325254 from 455772c3b5e8bfb24be28f93691cd501e7e04d43 to sc-qpr3-release am: ba243ced47

Original change: https://googleplex-android-review.googlesource.com/c/device/google/cuttlefish/+/17271827

Change-Id: I3dfbf4d3742ff557197a6ac8bc4db617f5e05040
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/guest/commands/bt_vhci_forwarder/main.cpp b/guest/commands/bt_vhci_forwarder/main.cpp
index 2194dd9..d5c4622 100644
--- a/guest/commands/bt_vhci_forwarder/main.cpp
+++ b/guest/commands/bt_vhci_forwarder/main.cpp
@@ -142,6 +142,11 @@
         PLOG(ERROR) << "vhci to virtio-console failed";
       }
     }
+    if (fds[1].revents & POLLHUP) {
+      LOG(ERROR) << "PollHUP";
+      usleep(50 * 1000);
+      continue;
+    }
     if (fds[1].revents & (POLLIN | POLLERR)) {
       // 'virtio-console to vhci' depends on H4Packetizer because vhci expects
       // full packet, but the data from virtio-console could be partial.