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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 4.5.3, 5.2.0, Some future release
    • Network: Proxies
    • 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

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

        Activity

          People

            peter-har Peter Hartmann
            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