Permit 0 length writes.
Change-Id: I087d0074c8d9e13ce814187475966da94f693fc0
This commit is contained in:
parent
a2a1f3149f
commit
b9634d05cf
|
@ -62,6 +62,10 @@ int SocketClient::sendData(const void* data, int len) {
|
|||
const char *p = (const char*) data;
|
||||
int brtw = len;
|
||||
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&mWriteMutex);
|
||||
while (brtw > 0) {
|
||||
if ((rc = write(mSocket, p, brtw)) < 0) {
|
||||
|
|
Loading…
Reference in New Issue