Task-number: QTBUG-36757
Change-Id: I4358563d52ecbff7b7e1575c5d34cef30b5fcd52
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
void QWebSocketServerPrivate::onNewConnection()
{
QTcpSocket *pTcpSocket = m_pTcpServer->nextPendingConnection();
+ //use a queued connection because a QSslSocket
+ //needs the event loop to process incoming data
+ //if not queued, data is incomplete when handshakeReceived is called
QObjectPrivate::connect(pTcpSocket, &QTcpSocket::readyRead,
- this, &QWebSocketServerPrivate::handshakeReceived);
+ this, &QWebSocketServerPrivate::handshakeReceived,
+ Qt::QueuedConnection);
}
/*!