Fixes cleanup issue in guest restart.
Adds an assignment I overlooked the first time.
The problem surfaced with the following sequence:
- host-side socket_forward_proxy starts
- host-side adb connect
- guest-side socket_forward_proxy starts
It produced a pair of queues where one was INACTIVE and the other was
HOST_CLOSED.
BUG: 72654144
Change-Id: Ie52d5907bd54c3b1c0c3bd83f262de94a704f19e
diff --git a/common/vsoc/lib/socket_forward_region_view.cpp b/common/vsoc/lib/socket_forward_region_view.cpp
index 5a232a2..8315b3e 100644
--- a/common/vsoc/lib/socket_forward_region_view.cpp
+++ b/common/vsoc/lib/socket_forward_region_view.cpp
@@ -147,7 +147,9 @@
state = (queue_pair.*WriteDirection).queue_state_;
#ifndef CUTTLEFISH_HOST
if (state == QueueState::HOST_CONNECTED) {
- state = (queue_pair.*WriteDirection).queue_state_ =
+ state =
+ (queue_pair.*WriteDirection).queue_state_ =
+ (queue_pair.*ReadDirection).queue_state_ =
QueueState::BOTH_CONNECTED;
}
#endif