We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4207c0 commit 42b368eCopy full SHA for 42b368e
1 file changed
src/AsyncSocketData.h
@@ -37,7 +37,7 @@ struct BackPressure {
37
pendingRemoval += length;
38
/* Always erase a minimum of 1/32th the current backpressure */
39
if (pendingRemoval > (buffer.length() >> 5)) {
40
- buffer.erase(0, pendingRemoval);
+ std::string(buffer.begin() + pendingRemoval, buffer.end()).swap(buffer);
41
pendingRemoval = 0;
42
}
43
0 commit comments