Host socket_forward_proxy waits for guest

If a host-side process connects then disconnects before the guest-side
process sees it: the host-side sfp queue will be marked as
HOST_DISCONNECTED so the guest-side sfp will never see acquire it. The
host-side sfp thread will wait forever for the host to send an END
marker through the shm region.

host-side sfp instead waits for the guest to connect before marking its
side as disconnected.

This sort of thing will happen when running adb connect repeatedly.

Bug: 79702418
Test: boot locally, run adb connect repeatedly, quickly, watch the
connections work themselves out.

Change-Id: I3e86bd848c1770075515efd79f88d477e478563b
3 files changed
tree: cf4b937406d4d120bba90e0a4c62c332995f7773
  1. common/
  2. guest/
  3. host/
  4. tests/
  5. tools/
  6. Android.bp
  7. Android.mk
  8. OWNERS