Merge PR #358: Increase the maximum allowed message size in JSONRPC
This commit is contained in:
commit
8a2d9c7e95
@ -623,8 +623,8 @@ void JsonRPCServerImplementation::processData(const QUuid &clientId, const QByte
|
||||
}
|
||||
m_clientBuffers[clientId] = buffer;
|
||||
|
||||
if (buffer.size() > 1024 * 10) {
|
||||
qCWarning(dcJsonRpc()) << "Client buffer larger than 10KB and no valid data. Dropping client connection.";
|
||||
if (buffer.size() > 1024 * 1024) {
|
||||
qCWarning(dcJsonRpc()) << "Client buffer larger than 1MB and no valid data. Dropping client connection.";
|
||||
interface->terminateClientConnection(clientId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1379,7 +1379,7 @@ void TestJSONRPC::testGarbageData()
|
||||
QSignalSpy spy(m_mockTcpServer, &MockTcpServer::connectionTerminated);
|
||||
|
||||
QByteArray data;
|
||||
for (int i = 0; i < 1024; i++) {
|
||||
for (int i = 0; i < 1024 * 1024; i++) {
|
||||
data.append("a");
|
||||
}
|
||||
for (int i = 0; i < 11 && spy.count() == 0; i ++) {
|
||||
|
||||
Reference in New Issue
Block a user