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

QTcpSocket connectToHost after bind can hang qt main thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.6.0
    • 5.5.1
    • Network
    • None
    • 6b6955c2ffdb23c461812ffcda12a2296ef58513

      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.

        1. main.cpp
          0.5 kB
          aaa
        2. main.pro
          0.1 kB
          aaa
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes