Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetworkAccessManager : server closed some connections prematurely
Forum Updated to NodeBB v4.3 + New Features

QNetworkAccessManager : server closed some connections prematurely

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    redstoneleo
    wrote on last edited by
    #1

    I made 24 requests to the network through QNetworkAccessManager::get() by a for-loop,after a few minutes later,the remote server closed some connections prematurely before the entire reply was received and processed,then the queued/pending download tasks cannot be done,
    so is there any anyway to allow me download all the files these links direct to without letting the server closed some connections prematurely ?

    here is the 24 request links(may be already expired)
    @
    http://119.145.138.182/youku/67811C7C45D14A82B3725284353/03000218104D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://121.12.89.51/youku/677677304654674F299B82C3D/03000218024D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://113.107.113.136/youku/677C1F7A44C3A81942BD642D08/03000218094D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://121.12.89.44/youku/65811C7C49674474CDE15834D5/03000218124D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://117.27.153.210/youku/6779B2C8E65497973D8405F92/03000218064D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://121.12.89.12/youku/6774D964A324C7560B1EC303A/03000218004D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://124.232.154.144/youku/65740A7E83D4E847C51CDD6AB5/03000218014D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://183.60.145.13/youku/658136590892317C7B95E533B8/03000218144D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://113.107.113.83/youku/6979B2C856D3181545A30657CD/03000218044D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://110.80.131.84/youku/6581296AAB6536811E99E3646F0/03000218134D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://183.60.145.19/youku/6575A84A6DB3B7F15567C28C5/03000218034D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://110.80.131.17/youku/69811C7C4DAF328108F7BC96EC3/030002180E4D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://124.232.154.132/youku/67817700E7473E838DB4FDA3B28/03000218174D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://124.232.154.182/youku/677DBD466B83583077D8B76023/030002180B4D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://110.80.131.15/youku/65810F8DE7AC42815F7CD7E6CB7/03000218114D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://183.61.6.232/youku/698183EF488F4781254747C3842/03000218164D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://120.37.140.115/youku/6578E3E2ABB31782AB906256A/03000218074D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://121.12.89.14/youku/697A81AE8D03773DF38D84136/03000218054D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://121.12.89.110/youku/677B50948C54C7560CEA261B7/03000218084D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://113.106.202.73/youku/69810F8DEBF44A8202A46144A2B/030002180D4D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://183.60.145.20/youku/677CEE607CC45811AF163742A4/030002180A4D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://113.103.44.108/youku/6981296AA5A634815C043313463/030002180F4D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://183.60.145.201/youku/6981029F8F0247812346E023EAB/030002180C4D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    http://121.12.89.18/youku/69817700E5E53873F194D5637D/03000218154D86756800B7019B3998DC9D450D-7CC6-5616-5022-461BD12BA794.flv
    @

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      What happens if you download those files at the same time from a web browser? Do you manage to complete them?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • R Offline
        R Offline
        redstoneleo
        wrote on last edited by
        #3

        QNetworkAccessManager queues the requests it receives. The number of requests executed in parallel is dependent on the protocol. Currently, for the HTTP protocol on desktop platforms, 6 requests are executed in parallel for one host/port combination.
        so some tasks are hanged at first.
        I just let the QNetworkAccessManager to manage them, do no interference to the behavior of QNetworkAccessManager.

        [quote author="JKSH" date="1417494372"]What happens if you download those files at the same time from a web browser? Do you manage to complete them?[/quote]

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Yes, I know about the queue management system

          I asked because some servers don't like multiple connections from the same client. For one application, I had to implement my own queue manager to download only one file at a time. Otherwise, my connection would sometimes close prematurely.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • R Offline
            R Offline
            redstoneleo
            wrote on last edited by
            #5

            the server does support multiple connections from the same client,the reason here for the connections closed prematurely perhaps is some tasks are hanged so there is no data transfer in the connections, so the server closed some connections prematurely ,while QNetworkAccessManager doesn't recreate the connection.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved