We need uncorkWithoutSending
This commit is contained in:
@@ -123,6 +123,12 @@ protected:
|
|||||||
getLoopData()->corkedSocket = this;
|
getLoopData()->corkedSocket = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void uncorkWithoutSending() {
|
||||||
|
if (isCorked()) {
|
||||||
|
getLoopData()->corkedSocket = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Cork this socket. Only one socket may ever be corked per-loop at any given time */
|
/* Cork this socket. Only one socket may ever be corked per-loop at any given time */
|
||||||
void cork() {
|
void cork() {
|
||||||
/* Extra check for invalid corking of others */
|
/* Extra check for invalid corking of others */
|
||||||
|
|||||||
+4
-2
@@ -119,8 +119,10 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
webSocketData->buffer.append(header + written, (size_t) header_length - (size_t) written);
|
webSocketData->buffer.append(header + written, (size_t) header_length - (size_t) written);
|
||||||
}
|
}
|
||||||
/* We cannot still be corked if we have backpressure */
|
/* We cannot still be corked if we have backpressure.
|
||||||
Super::uncork();
|
* We also cannot uncork normally since it will re-write the already buffered
|
||||||
|
* up backpressure again. */
|
||||||
|
Super::uncorkWithoutSending();
|
||||||
return BACKPRESSURE;
|
return BACKPRESSURE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user