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

When using QSslSocket::close() behind a proxy then a device error can occur

    XMLWordPrintable

    Details

    • Commits:
      ef4ba0285f9c5dd5ee2dca1e0cefee45eba3477c (qt/qtbase/dev)

      Description

      When using QSslSocket::close() behind a proxy then a device error can occur as it seems to be closing the plain socket prematurely as there seems to be more bytes to be written. If disconnectFromHost() is used instead first then it works fine. An unencrypted connection also works fine.

      With the example attached, the following can occur:

      on_pushButton_clicked, trying to connect 
      connected 
      encryptedBytesWrittenSlot sent bytes= 517 false 
      encryptedBytesWrittenSlot sent bytes= 126 false 
      encryptedSlot 
      size sent=104857600 
      bytesWrittenSlot sent bytes= 104857600 true 
      encryptedBytesWrittenSlot sent bytes= 105043200 true 
      QIODevice::write (QTcpSocket): device not open 
      errorSlot err=-1 
      

      To reproduce, in mainwindow.cpp change the IP address to be the one used by the proxy, and then build the application. Click on the pushbutton to see the result.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            manordheim MÃ¥rten Nordheim
            Reporter:
            andysh Andy Shaw
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes