diff options
author | Nick Kralevich <nnk@google.com> | 2011-04-27 09:55:31 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-27 09:55:31 -0700 |
commit | 02c8a9cf594d8a074a707e06553a230a690124c4 (patch) | |
tree | 3debc0260ec3ba326ab3ad743c3b2b44905e9deb /libsysutils | |
parent | 81ce51dae95deb0dc6b07cbd96bd07d08aad5178 (diff) | |
parent | 18f6d964cbee483106da5c96a8c067a948324da7 (diff) | |
download | core-02c8a9cf594d8a074a707e06553a230a690124c4.tar.gz core-02c8a9cf594d8a074a707e06553a230a690124c4.tar.bz2 core-02c8a9cf594d8a074a707e06553a230a690124c4.zip |
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.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libsysutils/src/SocketListener.cpp b/libsysutils/src/SocketListener.cpp index 69ed79edf..fcad624b1 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) { |