Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-133

IoUtils.transfer method returns wrong result

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0.Beta2
    • None
    • api
    • None
    • Hide

      Update value of total variable inside the while loop:
      total += res;

      Show
      Update value of total variable inside the while loop: total += res;

      The main loop of IoUtils.transfer method does not increment the total number of transferred bytes, which should be performed at every step of the iteration.
      As a result, the return value could be wrong, and more bytes than requested could end up being transferred.

            flaviarnn Flavia Rainone
            flaviarnn Flavia Rainone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: