mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-25 09:13:16 -05:00
Socket buffer size fix (#1720)
This commit is contained in:
parent
0650b3084e
commit
3a92e4aab9
5 changed files with 24 additions and 5 deletions
|
|
@ -22,6 +22,13 @@ NativeMessagingHost::NativeMessagingHost() : NativeMessagingBase()
|
|||
{
|
||||
m_localSocket = new QLocalSocket();
|
||||
m_localSocket->connectToServer(getLocalServerPath());
|
||||
m_localSocket->setReadBufferSize(NATIVE_MSG_MAX_LENGTH);
|
||||
|
||||
int socketDesc = m_localSocket->socketDescriptor();
|
||||
if (socketDesc) {
|
||||
int max = NATIVE_MSG_MAX_LENGTH;
|
||||
setsockopt(socketDesc, SOL_SOCKET, SO_SNDBUF, &max, sizeof(max));
|
||||
}
|
||||
#ifdef Q_OS_WIN
|
||||
m_running.store(true);
|
||||
m_future = QtConcurrent::run(this, static_cast<void(NativeMessagingHost::*)()>(&NativeMessagingHost::readNativeMessages));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue