From 04ceffa6b600c38de6764508e216b8f6c9a1e4e5 Mon Sep 17 00:00:00 2001 From: Han Pengfei Date: Fri, 23 Feb 2018 11:03:34 +0800 Subject: [PATCH] Reset the unlock. Signed-off-by: Han Pengfei --- src/anbox/qemu/adb_message_processor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()),