Merge "libsysutils: SocketListener: handle recv errors more gracefully."
This commit is contained in:
commit
f819d02336
1 changed files with 3 additions and 2 deletions
|
|
@ -213,8 +213,9 @@ void SocketListener::runListener() {
|
||||||
it = pendingList->begin();
|
it = pendingList->begin();
|
||||||
SocketClient* c = *it;
|
SocketClient* c = *it;
|
||||||
pendingList->erase(it);
|
pendingList->erase(it);
|
||||||
/* Process it, if false is returned, remove and destroy it */
|
/* Process it, if false is returned and our sockets are
|
||||||
if (!onDataAvailable(c)) {
|
* connection-based, remove and destroy it */
|
||||||
|
if (!onDataAvailable(c) && mListen) {
|
||||||
/* Remove the client from our array */
|
/* Remove the client from our array */
|
||||||
pthread_mutex_lock(&mClientsLock);
|
pthread_mutex_lock(&mClientsLock);
|
||||||
for (it = mClients->begin(); it != mClients->end(); ++it) {
|
for (it = mClients->begin(); it != mClients->end(); ++it) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue