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

QHostInfoLookupManager::work does not run thread with new schedule after the computer goes to sleep mode (windows)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 4.6.2
    • Network
    • None
    • Windows XP, Vista, 7. Regular Sleep mode with network setup to sleep.

    Description

      QHostInfoLookupManager::work

      Noticed that after prolonged sleep the host lookup would not work.
      I created a program that accesses a website every 60 seconds. If the computer goes to sleep with network set to sleep as well, the host lookup would not work.

      I debugged the problem and found out that inside QHostInfoLookupManager::work there were over 100 postponed lookups. Because the toBeLookedUp was the same for all request, then it will not schedule a new lookup. Thus never creating the thread to do the actual lookup and never returning the ip address to do finish the QNetworkAccessManager get function.

      qhostinfo.cpp:line505

      for (int i = 0; i < currentLookups.size(); i++) {
                      if (currentLookups.at(i)->toBeLookedUp == scheduled->toBeLookedUp) {
                          iterator.remove();
                          postponedLookups.append(scheduled);
                          scheduled = 0;
                          break;
                      }
                  }
      

      I am not sure what makes the first request not come back. But I did notice that the requests start going into the postponedLookups.

      Attachments

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

        Activity

          People

            mgoetz Markus Goetz (Inactive)
            vision06 Omar Mourad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes