Merge "adb: use asocket\'s close function when closing."
am: 684d543922
* commit '684d543922465538dd233c99c0cf492f1f24233c':
adb: use asocket's close function when closing.
Change-Id: Icb05f95c2cb16800dd114f52e6f301dae72ad654
diff --git a/adb/sockets.cpp b/adb/sockets.cpp
index b6ed868..b2555d0 100644
--- a/adb/sockets.cpp
+++ b/adb/sockets.cpp
@@ -39,8 +39,6 @@
#include "sysdeps/mutex.h"
#include "transport.h"
-static void local_socket_close(asocket* s);
-
static std::recursive_mutex& local_socket_list_lock = *new std::recursive_mutex();
static unsigned local_socket_next_id = 1;
@@ -118,7 +116,7 @@
restart:
for (s = local_socket_list.next; s != &local_socket_list; s = s->next) {
if (s->transport == t || (s->peer && s->peer->transport == t)) {
- local_socket_close(s);
+ s->close(s);
goto restart;
}
}