Fix requiresWrite uncorking bug

This commit is contained in:
Alex Hultman
2021-09-15 02:38:42 +02:00
parent d4a24fdb5e
commit 292b00c4c3
+6
View File
@@ -120,6 +120,12 @@ public:
protocol::formatMessage<isServer>(sendBuffer, message.data(), message.length(), opCode, message.length(), compress);
/* This is the slow path, when we couldn't cork for the user */
if (requiresWrite) {
/* We tried corking for the user but in the end we did not even fit in the cork buffer */
if (automaticallyCorked) {
Super::uncork();
automaticallyCorked = false;
}
auto[written, failed] = Super::write(sendBuffer, (int) messageFrameSize);
/* For now, we are slow here */