Accept all connections until none are available
When newConnection is called pendingConnections may have more than one connectio, so we have to iterate and use all of them.
This commit is contained in:
parent
e4e4004912
commit
4a74f413ae
1 changed files with 5 additions and 3 deletions
|
@ -222,10 +222,12 @@ void LanLinkProvider::newConnection()
|
|||
{
|
||||
//kDebug(kdeconnect_kded()) << "LanLinkProvider newConnection";
|
||||
|
||||
QTcpSocket* socket = mTcpServer->nextPendingConnection();
|
||||
socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1);
|
||||
while(mTcpServer->hasPendingConnections()) {
|
||||
QTcpSocket* socket = mTcpServer->nextPendingConnection();
|
||||
socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1);
|
||||
|
||||
connect(socket,SIGNAL(readyRead()),this,SLOT(dataReceived()));
|
||||
connect(socket, SIGNAL(readyRead()), this, SLOT(dataReceived()));
|
||||
}
|
||||
|
||||
/*
|
||||
NetworkPackage np(PACKAGE_TYPE_IDENTITY);
|
||||
|
|
Loading…
Reference in a new issue