Improve large backpressure drain performance

This commit is contained in:
Alex Hultman
2021-09-16 17:13:13 +02:00
parent 292b00c4c3
commit 7c1ba44545
5 changed files with 43 additions and 7 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ protected:
if ((unsigned int) written < asyncSocketData->buffer.length()) {
/* Update buffering (todo: we can do better here if we keep track of what happens to this guy later on) */
asyncSocketData->buffer = asyncSocketData->buffer.substr((size_t) written);
asyncSocketData->buffer.erase((unsigned int) written);
if (optionally) {
/* Thankfully we can exit early here */