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

QTcpSocket connectToHost after bind can hang qt main thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.6.0
    • Component/s: Network
    • Labels:
      None
    • Commits:
      6b6955c2ffdb23c461812ffcda12a2296ef58513

      Description

      My host has many ip addresses and need to send packets from correct ip, so where is need to use QTcpSocket bind.
      If remote host reject connection - qt hangs in infinity loop in QIODevicePrivateLinearBuffer::makeSpace (with newCapacity == 0)

      while (newCapacity < required)
      newCapacity *= 2;

      Simple example attached.

        Attachments

        1. main.cpp
          0.5 kB
        2. main.pro
          0.1 kB

          Issue Links

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

            Activity

              People

              Assignee:
              alex1973tr Alex Trotsenko
              Reporter:
              aaa aaa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes