diff --git a/src/anbox/qemu/adb_message_processor.cpp b/src/anbox/qemu/adb_message_processor.cpp index 0387088..24d3bb7 100644 --- a/src/anbox/qemu/adb_message_processor.cpp +++ b/src/anbox/qemu/adb_message_processor.cpp @@ -72,12 +72,12 @@ void AdbMessageProcessor::advance_state() { // one is established but will not use it until the active one is closed. lock_.lock(); - if (state_ == closed_by_host) + if (state_ == closed_by_host) { host_connector_.reset(); - else - wait_for_host_connection(); + return; + } - lock_.unlock(); + wait_for_host_connection(); break; case waiting_for_host_connection: messenger_->send(reinterpret_cast(ok_command.data()),