Fix AsyncSocket buffering mistake
This commit is contained in:
+2
-2
@@ -139,11 +139,11 @@ protected:
|
|||||||
/* Fall back to worst possible case (should be very rare for HTTP) */
|
/* Fall back to worst possible case (should be very rare for HTTP) */
|
||||||
/* At least we can reserve room for next chunk if we know it up front */
|
/* At least we can reserve room for next chunk if we know it up front */
|
||||||
if (nextLength) {
|
if (nextLength) {
|
||||||
asyncSocketData->buffer.reserve(asyncSocketData->buffer.length() + length + nextLength);
|
asyncSocketData->buffer.reserve(asyncSocketData->buffer.length() + length - written + nextLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Buffer this chunk */
|
/* Buffer this chunk */
|
||||||
asyncSocketData->buffer.append(src, length);
|
asyncSocketData->buffer.append(src + written, length - written);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user