loolwsd: allow frame size of 200K

I got:

WebSocketException: Insufficient buffer for payload size 113579

So double the allocated size: that seems to help.
This commit is contained in:
Miklos Vajna 2015-10-16 15:23:49 +02:00
parent 84b7b128a0
commit 700b7d08b7

View file

@ -262,7 +262,7 @@ public:
ws->setReceiveTimeout(0);
do
{
char buffer[100000];
char buffer[200000];
n = ws->receiveFrame(buffer, sizeof(buffer), flags);
if (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE)
@ -316,7 +316,7 @@ public:
}
catch (WebSocketException& exc)
{
Application::instance().logger().error(Util::logPrefix() + "WebSocketException: " + exc.message());
Application::instance().logger().error(Util::logPrefix() + "RequestHandler::handleRequest(), WebSocketException: " + exc.message());
switch (exc.code())
{
case WebSocket::WS_ERR_HANDSHAKE_UNSUPPORTED_VERSION:
@ -384,7 +384,7 @@ public:
{
do
{
char buffer[100000];
char buffer[200000];
n = _ws.receiveFrame(buffer, sizeof(buffer), flags);
if (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE)
@ -399,7 +399,7 @@ public:
}
catch (WebSocketException& exc)
{
Application::instance().logger().error(Util::logPrefix() + "WebSocketException: " + exc.message());
Application::instance().logger().error(Util::logPrefix() + "TestOutput::run(), WebSocketException: " + exc.message());
_ws.close();
}
}