diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2005-05-02 10:03:12 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2005-05-02 10:03:12 +0000 | 
| commit | 9a3e0e52cbb0999efb3906b67cbb94c22a37cb32 (patch) | |
| tree | 687abee8ed537b4fa99798c27dc41b23d404dfff /tests | |
| parent | b0f856213d3f01fd5b87b5eee6725ecaea2c6876 (diff) | |
fix the server for the slow response case
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ftpserver.pl | 24 | 
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 3aed88b59..dd8383fa6 100644 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -585,17 +585,23 @@ sub PASV_command {      eval {          local $SIG{ALRM} = sub { die "alarm\n" }; -        alarm 5; # assume swift operations +	# assume swift operations unless explicitly slow +	alarm ($controldelay?20:5);          # Wait for 'CNCT' -        my $input = <DREAD>; - -        if($input !~ /^CNCT/) { -            # we wait for a connected client -            next; -        } -        logmsg "====> Client DATA connect\n"; - +	my $input; +	my $size; + +        while(sysread(DREAD, $input, $size)) { + +	    if($input !~ /^CNCT/) { +		# we wait for a connected client +		logmsg "Odd, we got $input from client\n"; +		next; +	    } +	    logmsg "====> Client DATA connect\n"; +	    last; +	}          alarm 0;      };      if ($@) {  | 
