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

QTcpSocket::bytesWritten is emmited too soon when using QNetworkProxy::HttpProxy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 4.5.3, 5.2.0, Some future release
    • Fix Version/s: Some future release
    • Component/s: Network: Proxies
    • Labels:
      None

      Description

      When writing to a QTcpSocket through an HttpProxy, the bytesWritten signal is emitted right after QTcpSocket::write() is called. In some applications this cause all the writes to be buffered up in memory until disconnectFromHost() is called.

      Compounding the issue, QAbstractSocket::disconnectFromHost() forcibly close the socket if pending writes don't complete after two seconds. This was apparently intended to avoid a Mac bug (see comment in that function)

      This was first noticed using QFtp in Qt4 but the core issue still exists on a recent checkout of the Qt5 dev branch.

        Attachments

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

          Activity

            People

            • Assignee:
              peter-har Peter Hartmann
              Reporter:
              ajasmin Alexandre Jasmin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes