adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
Also check that device is not already connected in "adb connect"
Change-Id: I5f84b56b63d8c6932f23791cac319fd6bc39d36c
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/jdwp_service.c b/jdwp_service.c
index ae7f12d..0c26f7b 100644
--- a/jdwp_service.c
+++ b/jdwp_service.c
@@ -164,7 +164,7 @@
proc->next->prev = proc->prev;
if (proc->socket >= 0) {
- shutdown(proc->socket, SHUT_RDWR);
+ adb_shutdown(proc->socket);
adb_close(proc->socket);
proc->socket = -1;
}