mirror of
https://github.com/webmin/webmin.git
synced 2025-07-25 15:09:18 +00:00
Increase timeout for subsequent RPC calls
This commit is contained in:
@ -56,11 +56,12 @@ $acptaddr = accept(SOCK, MAIN);
|
|||||||
die "accept failed!" if (!$acptaddr);
|
die "accept failed!" if (!$acptaddr);
|
||||||
select(SOCK); $| = 1;
|
select(SOCK); $| = 1;
|
||||||
|
|
||||||
|
$rcount = 0;
|
||||||
while(1) {
|
while(1) {
|
||||||
# Wait for the request
|
# Wait for the request. Wait longer if this isn't the first one
|
||||||
local $rmask;
|
local $rmask;
|
||||||
vec($rmask, fileno(SOCK), 1) = 1;
|
vec($rmask, fileno(SOCK), 1) = 1;
|
||||||
local $sel = select($rmask, undef, undef, 60);
|
local $sel = select($rmask, undef, undef, $rcount ? 360 : 60);
|
||||||
if ($sel <= 0) {
|
if ($sel <= 0) {
|
||||||
print STDERR "fastrpc: session timed out\n"
|
print STDERR "fastrpc: session timed out\n"
|
||||||
if ($gconfig{'rpcdebug'});
|
if ($gconfig{'rpcdebug'});
|
||||||
@ -281,6 +282,7 @@ while(1) {
|
|||||||
print SOCK length($rawrv),"\n";
|
print SOCK length($rawrv),"\n";
|
||||||
print SOCK $rawrv;
|
print SOCK $rawrv;
|
||||||
last if ($arg->{'action'} eq 'quit');
|
last if ($arg->{'action'} eq 'quit');
|
||||||
|
$rcount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
# allocate_socket(handle, &port)
|
# allocate_socket(handle, &port)
|
||||||
|
Reference in New Issue
Block a user