Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4dfaa886 authored by Josh Gao's avatar Josh Gao
Browse files

adb: fix erase-remove_if idiom.

This probably doesn't have any actual effect, because there should only
be one smartsocket listener so this will happen to work, but this looks
sketchy.

Test: mma
Test: adb server nodaemon & (sleep 1; adb kill-server)
Change-Id: Id00ab1fc1fc029949c675ae6e3b1a77f3e9e4c69
parent d72d92ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ void close_smartsockets() EXCLUDES(listener_list_mutex) {
    auto pred = [](const std::unique_ptr<alistener>& listener) {
        return listener->local_name == "*smartsocket*";
    };
    listener_list.erase(std::remove_if(listener_list.begin(), listener_list.end(), pred));
    listener_list.remove_if(pred);
}

InstallStatus install_listener(const std::string& local_name, const char* connect_to,