mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
fix the server for the slow response case
This commit is contained in:
parent
b0f856213d
commit
9a3e0e52cb
@ -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>;
|
||||
my $input;
|
||||
my $size;
|
||||
|
||||
if($input !~ /^CNCT/) {
|
||||
# we wait for a connected client
|
||||
next;
|
||||
}
|
||||
logmsg "====> Client DATA connect\n";
|
||||
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 ($@) {
|
||||
|
Loading…
Reference in New Issue
Block a user