Merge "adb: detect closed jdwp socket."

am: e1c4e04f82

Change-Id: Ife55285da64e0c12dac3cd8e8171126c3bb8b543
This commit is contained in:
Josh Gao 2017-03-20 20:04:38 +00:00 committed by android-build-merger
commit 7e5b10b18c
1 changed files with 1 additions and 5 deletions

View File

@ -232,11 +232,7 @@ static void jdwp_process_event(int socket, unsigned events, void* _proc) {
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;
}