]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: fix CURLM_STATE_TOOFAST for multi_socket
authorNicholas Maniscalco <nicholas@maniscalco.com>
Wed, 2 Feb 2011 12:41:22 +0000 (13:41 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 2 Feb 2011 12:41:22 +0000 (13:41 +0100)
The code in the toofast state needs to first recalculate the values
before it uses them again since it may have been a while since it last
did it when it reaches this point.

lib/multi.c

index ecd72bb3204c5fa40db4ab3b0d42705987620857..122f66b40514ef12d5becde182556054078e7530 100644 (file)
@@ -1408,6 +1408,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
 
     case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
       /* if both rates are within spec, resume transfer */
+      Curl_pgrsUpdate(easy->easy_conn);
       if( ( (data->set.max_send_speed == 0) ||
             (data->progress.ulspeed < data->set.max_send_speed ))  &&
           ( (data->set.max_recv_speed == 0) ||