libsysutils: Fix a file descriptor leak.
The recent refactoring of the select() loop in SocketListener missed a close() of the file descriptor when the onDataAvailable() callback returns false. Change-Id: I767caefab4b98ab350f2db2497ee2bd630f20850
This commit is contained in:
parent
c1b546b22d
commit
b913b5170f
1 changed files with 1 additions and 0 deletions
|
@ -225,6 +225,7 @@ void SocketListener::runListener() {
|
|||
}
|
||||
pthread_mutex_unlock(&mClientsLock);
|
||||
/* Destroy the client */
|
||||
close(c->getSocket());
|
||||
delete c;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue