fix the server for the slow response case
This commit is contained in:
@@ -585,17 +585,23 @@ sub PASV_command {
|
|||||||
eval {
|
eval {
|
||||||
local $SIG{ALRM} = sub { die "alarm\n" };
|
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'
|
# Wait for 'CNCT'
|
||||||
my $input = <DREAD>;
|
my $input;
|
||||||
|
my $size;
|
||||||
|
|
||||||
|
while(sysread(DREAD, $input, $size)) {
|
||||||
|
|
||||||
if($input !~ /^CNCT/) {
|
if($input !~ /^CNCT/) {
|
||||||
# we wait for a connected client
|
# we wait for a connected client
|
||||||
|
logmsg "Odd, we got $input from client\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
logmsg "====> Client DATA connect\n";
|
logmsg "====> Client DATA connect\n";
|
||||||
|
last;
|
||||||
|
}
|
||||||
alarm 0;
|
alarm 0;
|
||||||
};
|
};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
|
|||||||
Reference in New Issue
Block a user