]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: use the correct fd after select
authorDan Fandrich <dan@coneharvesters.com>
Fri, 19 May 2023 04:11:57 +0000 (21:11 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 21 May 2023 05:15:15 +0000 (22:15 -0700)
The code was using the wrong fd when determining which runner was ready
with a response.

Ref: #10818
Closes #11160

tests/runner.pm

index 89182004bff1e8d3afdda03bbb80345aaf3ddc27..86867d0fd1fb105aae35a3c8a20cd2ec76609d67 100644 (file)
@@ -1226,7 +1226,7 @@ sub runnerar {
 }
 
 ###################################################################
-# Returns runnder ID if a response from an async call is ready
+# Returns runner ID if a response from an async call is ready
 # argument is 0 for nonblocking, undef for blocking, anything else for timeout
 # Called by controller
 sub runnerar_ready {
@@ -1248,7 +1248,7 @@ sub runnerar_ready {
     # TODO: handle errors
     if(select(my $rout=$rin, undef, undef, $blocking)) {
         for my $fd (0..$maxfileno) {
-            if(vec($rin, $fd, 1)) {
+            if(vec($rout, $fd, 1)) {
                 return $idbyfileno{$fd};
             }
         }