Merge pull request #213 from morphis/f/correctly-close-adb-connection
Close connection when adbd connection is closed
This commit is contained in:
commit
e10a5fd0a5
1 changed files with 2 additions and 1 deletions
|
|
@ -156,7 +156,8 @@ void AdbMessageProcessor::on_host_read_size(
|
||||||
const boost::system::error_code &error, std::size_t bytes_read) {
|
const boost::system::error_code &error, std::size_t bytes_read) {
|
||||||
if (error) {
|
if (error) {
|
||||||
state_ = closed_by_host;
|
state_ = closed_by_host;
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error(error.message()));
|
messenger_->close();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
messenger_->send(reinterpret_cast<const char *>(host_buffer_.data()), bytes_read);
|
messenger_->send(reinterpret_cast<const char *>(host_buffer_.data()), bytes_read);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue