| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/android/forwarder2/host_controller.h" | 5 #include "tools/android/forwarder2/host_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 << ": Could not connect to device on port " | 169 << ": Could not connect to device on port " |
| 170 << adb_port_; | 170 << adb_port_; |
| 171 return; | 171 return; |
| 172 } | 172 } |
| 173 if (!SendCommand(command::UNLISTEN, device_port_, &socket)) { | 173 if (!SendCommand(command::UNLISTEN, device_port_, &socket)) { |
| 174 LOG(ERROR) << device_serial_ | 174 LOG(ERROR) << device_serial_ |
| 175 << ": Could not send unmap command for port " | 175 << ": Could not send unmap command for port " |
| 176 << device_port_; | 176 << device_port_; |
| 177 return; | 177 return; |
| 178 } | 178 } |
| 179 if (!ReceivedCommand(command::UNLISTEN_SUCCESS, &socket)) { | 179 if (!ReceivedCommandWithTimeout(command::UNLISTEN_SUCCESS, &socket, 10)) { |
| 180 LOG(ERROR) << device_serial_ | 180 LOG(ERROR) << device_serial_ |
| 181 << ": Unmap command failed for port " | 181 << ": Unmap command failed for port " |
| 182 << device_port_; | 182 << device_port_; |
| 183 return; | 183 return; |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace forwarder2 | 187 } // namespace forwarder2 |
| OLD | NEW |