diff options
author | Nick Kralevich <nnk@google.com> | 2011-04-27 09:40:04 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-27 09:40:04 -0700 |
commit | 18f6d964cbee483106da5c96a8c067a948324da7 (patch) | |
tree | bcf730e2301860816597c7b5ff20e93a9e5a51a3 | |
parent | 55537c347bb31d0e2b176ca2550d2054877f9d54 (diff) | |
parent | f819d0233646668b06de36a787979e3b180d6c48 (diff) | |
download | system_core-18f6d964cbee483106da5c96a8c067a948324da7.zip system_core-18f6d964cbee483106da5c96a8c067a948324da7.tar.gz system_core-18f6d964cbee483106da5c96a8c067a948324da7.tar.bz2 |
am f819d023: Merge "libsysutils: SocketListener: handle recv errors more gracefully."
* commit 'f819d0233646668b06de36a787979e3b180d6c48':
libsysutils: SocketListener: handle recv errors more gracefully.
-rw-r--r-- | libsysutils/src/SocketListener.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libsysutils/src/SocketListener.cpp b/libsysutils/src/SocketListener.cpp index 69ed79e..fcad624 100644 --- a/libsysutils/src/SocketListener.cpp +++ b/libsysutils/src/SocketListener.cpp @@ -213,8 +213,9 @@ void SocketListener::runListener() { it = pendingList->begin(); SocketClient* c = *it; pendingList->erase(it); - /* Process it, if false is returned, remove and destroy it */ - if (!onDataAvailable(c)) { + /* Process it, if false is returned and our sockets are + * connection-based, remove and destroy it */ + if (!onDataAvailable(c) && mListen) { /* Remove the client from our array */ pthread_mutex_lock(&mClientsLock); for (it = mClients->begin(); it != mClients->end(); ++it) { |