Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: tools/android/forwarder2/host_controller.cc

Issue 2402793002: [Android] Add timeout to unmap reply handling. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/android/forwarder2/host_controller.cc
diff --git a/tools/android/forwarder2/host_controller.cc b/tools/android/forwarder2/host_controller.cc
index eb49ee99a15f182fe7b5e90d3541b0040a319c9b..f9a8e80e4053417f82d548738a639ef04abb09ee 100644
--- a/tools/android/forwarder2/host_controller.cc
+++ b/tools/android/forwarder2/host_controller.cc
@@ -176,7 +176,7 @@ void HostController::UnmapPortOnDevice() {
<< device_port_;
return;
}
- if (!ReceivedCommand(command::UNLISTEN_SUCCESS, &socket)) {
+ if (!ReceivedCommandWithTimeout(command::UNLISTEN_SUCCESS, &socket, 10)) {
LOG(ERROR) << device_serial_
<< ": Unmap command failed for port "
<< device_port_;

Powered by Google App Engine
This is Rietveld 408576698