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

Connect timeout in qabstractsocket.cpp is too long

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 5.9
    • 5.7.0
    • Network: Sockets
    • None
    • I have reproduced this on Windows 10, but presumably this affects all platforms.

    • 58e1465cb0042899063124ded827f52dd92b8b42

    Description

      The QT_CONNECT_TIMEOUT constant in qabstractsocket.cpp is by default set to 30 seconds. This value is used in QAbstractSocketPrivate::_q_connectToNextAddress to determine when a connection attempt should time out.

      This causes problems when trying to connect to an address that maps to a pool of IP addresses and a portion of those IP addresses is blocked for whatever reason.

      Ideally this timeout value should be configurable.

      A concrete example of this when trying to connect to binaries.eveonline.com from Russia. binaries.eveonline.com is hosted on Amazon's CloudFront, and Russian EVE players are reporting that individual IP addresses from the pool that this maps to are being blocked. The EVE launcher uses QNetworkAccessManager to download resources from this address. When some (or most) of the addresses are blocked, this can take a very long time when each connection made has to wait for a 30 second timeout before trying the next address in the pool.

      This can be reproduced with the help of the Windows Firewall - use it to block most of the IP addresses returned by nslook binaries.eveonline.com.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            snorri.sturluson Snorri Sturluson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes