Permit 0 length writes.

Change-Id: I087d0074c8d9e13ce814187475966da94f693fc0
This commit is contained in:
Brad Fitzpatrick 2010-11-02 10:55:52 -07:00
parent a2a1f3149f
commit b9634d05cf
1 changed files with 4 additions and 0 deletions

View File

@ -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) {