mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Increase slow RPC timeout
This commit is contained in:
9
rpc.cgi
9
rpc.cgi
@@ -13,8 +13,9 @@ use POSIX;
|
||||
&init_config();
|
||||
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
|
||||
local $got;
|
||||
while(length($rawarg) < $ENV{'CONTENT_LENGTH'}) {
|
||||
read(STDIN, $got, $ENV{'CONTENT_LENGTH'}) > 0 || last;
|
||||
local $left = $ENV{'CONTENT_LENGTH'} - length($rawarg);
|
||||
while($left > 0) {
|
||||
read(STDIN, $got, $left) > 0 || last;
|
||||
$rawarg .= $got;
|
||||
}
|
||||
}
|
||||
@@ -49,9 +50,10 @@ if ($arg->{'newsession'}) {
|
||||
close(STDOUT);
|
||||
close(miniserv::SOCK);
|
||||
local $stime = time();
|
||||
local $rcount = 0;
|
||||
while(1) {
|
||||
local ($rawcmd, $cmd, @rv);
|
||||
alarm(10);
|
||||
alarm($rcount ? 360 : 60);
|
||||
open(FIFO, $fifo1) || last;
|
||||
while(<FIFO>) {
|
||||
$rawcmd .= $_;
|
||||
@@ -98,6 +100,7 @@ EOF
|
||||
}
|
||||
close(FIFO);
|
||||
last if ($cmd->{'action'} eq 'quit');
|
||||
$rcount++;
|
||||
}
|
||||
unlink($fifo1);
|
||||
unlink($fifo2);
|
||||
|
||||
@@ -5998,7 +5998,7 @@ foreach my $sn (keys %remote_session) {
|
||||
delete($remote_session{$sn});
|
||||
delete($remote_session_server{$sn});
|
||||
}
|
||||
foreach $fh (keys %fast_fh_cache) {
|
||||
foreach my $fh (keys %fast_fh_cache) {
|
||||
close($fh);
|
||||
delete($fast_fh_cache{$fh});
|
||||
}
|
||||
@@ -6015,7 +6015,7 @@ sub remote_error_setup
|
||||
$main::remote_error_handler = $_[0] || \&error;
|
||||
}
|
||||
|
||||
=head2 remote_rpc_call(server, structure)
|
||||
=head2 remote_rpc_call(server, &structure)
|
||||
|
||||
Calls rpc.cgi on some server and passes it a perl structure (hash,array,etc)
|
||||
and then reads back a reply structure. This is mainly for internal use only,
|
||||
|
||||
Reference in New Issue
Block a user