Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44866

ssl websocketserver invalid connection blocks new.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.0 RC
    • 5.4.0, 5.4.1
    • WebSockets
    • 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

          For Gerrit Dashboard: QTBUG-44866
          # Subject Branch Project Status CR V

          Activity

            People

              liaqi Liang Qi
              kriborgen Kristian Borgen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes