adb: detect closed jdwp socket.

If a process opens a JDWP socket, but crashes before writing the full
PID, adbd will spin forever.

Bug: http://b/36411868
Test: none
Change-Id: I1811759e15c3d9c819685c5fc159a566bd4bc842
(cherry picked from commit 3fd78c922c2670333e2cfa947e50f64460ced721)
diff --git a/adb/jdwp_service.cpp b/adb/jdwp_service.cpp
index 9589d88..af911bf 100644
--- a/adb/jdwp_service.cpp
+++ b/adb/jdwp_service.cpp
@@ -232,11 +232,7 @@
             size_t size = PID_LEN - proc->in_len;
 
             ssize_t rc = TEMP_FAILURE_RETRY(recv(socket, p, size, 0));
-            if (rc < 0) {
-                if (errno == EAGAIN) {
-                    return;
-                }
-
+            if (rc <= 0) {
                 D("failed to read jdwp pid: %s", strerror(errno));
                 goto CloseProcess;
             }