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

QTcpSocket connectToHost after bind can hang qt main thread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0
    • 5.5.1
    • Network
    • None
    • 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

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

          Activity

            People

              alex1973tr Alex Trotsenko
              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