diff --git a/src/WebSocket.h b/src/WebSocket.h index 389cae5..6ed3497 100644 --- a/src/WebSocket.h +++ b/src/WebSocket.h @@ -120,6 +120,12 @@ public: protocol::formatMessage(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 */