Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.0, 5.4.1
-
None
-
Ubuntu 14.04 64bit
-
5edfb3c7ee338c0b562f33a8c4315454bfc18886
Description
When a connection is made which for some reason is invalid the server is unable to handle new connections.
The problem can be replicated with the example sslechoserver and sslechoclient, start the server, do a request with the client to see is works, telnet localhost 1234 to make an invalid connection, the client will now just hang when trying to connect.
The problem is this construction which is only used with ssl.
QSslServer::incomingConnection calls addPendingConnection(pSslSocket)
QTcpServerPrivate::readNotification don't emit newConnection when the descriptor is invalid, and the connection is not removed from m_pTcpServer, which now holds an invalid connection and next time a valid connection is made nextPendingConnection returns the old invalid in QWebSocketServerPrivate::onNewConnection, new connections not possible anymore.
A simple solution is attached.
Attachments
Issue Links
- is duplicated by
-
QTBUG-42283 QWebSocketServer with secureMode established in SecureMode stops accepting connections after connecting to it via ws://
- Closed
For Gerrit Dashboard: QTBUG-44866 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
110233,5 | QWebSocketServer: handle new connection after invalid one | 5.5 | qt/qtwebsockets | Status: MERGED | -2 | 0 |
112910,1 | Tests: first ssl auto test for qwebsocketserver | 5.5 | qt/qtwebsockets | Status: DEFERRED | 0 | 0 |