aboutsummaryrefslogtreecommitdiffstats
path: root/libsysutils
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2011-04-27 09:55:31 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-27 09:55:31 -0700
commit02c8a9cf594d8a074a707e06553a230a690124c4 (patch)
tree3debc0260ec3ba326ab3ad743c3b2b44905e9deb /libsysutils
parent81ce51dae95deb0dc6b07cbd96bd07d08aad5178 (diff)
parent18f6d964cbee483106da5c96a8c067a948324da7 (diff)
downloadsystem_core-02c8a9cf594d8a074a707e06553a230a690124c4.zip
system_core-02c8a9cf594d8a074a707e06553a230a690124c4.tar.gz
system_core-02c8a9cf594d8a074a707e06553a230a690124c4.tar.bz2
am 18f6d964: am f819d023: Merge "libsysutils: SocketListener: handle recv errors more gracefully."
* commit '18f6d964cbee483106da5c96a8c067a948324da7': libsysutils: SocketListener: handle recv errors more gracefully.
Diffstat (limited to 'libsysutils')
-rw-r--r--libsysutils/src/SocketListener.cpp5
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) {