mirror of
https://github.com/transmission/transmission
synced 2025-02-02 20:43:51 +00:00
(libT) poll the RPC request queue more frequently if there have been recent requests.
This commit is contained in:
parent
b94893a4c9
commit
cd314c1af8
1 changed files with 1 additions and 1 deletions
|
@ -55,6 +55,7 @@ static void
|
||||||
handle_rpc( struct shttpd_arg * arg )
|
handle_rpc( struct shttpd_arg * arg )
|
||||||
{
|
{
|
||||||
struct tr_rpc_server * s = arg->user_data;
|
struct tr_rpc_server * s = arg->user_data;
|
||||||
|
s->lastRequestTime = time( NULL );
|
||||||
|
|
||||||
if( !EVBUFFER_LENGTH( s->out ) )
|
if( !EVBUFFER_LENGTH( s->out ) )
|
||||||
{
|
{
|
||||||
|
@ -116,7 +117,6 @@ rpcPulse( int socket UNUSED, short action UNUSED, void * vserver )
|
||||||
/* set a timer for the next pulse */
|
/* set a timer for the next pulse */
|
||||||
if( EVBUFFER_LENGTH( server->in ) || EVBUFFER_LENGTH( server->out ) ) {
|
if( EVBUFFER_LENGTH( server->in ) || EVBUFFER_LENGTH( server->out ) ) {
|
||||||
interval = BUSY_INTERVAL_MSEC;
|
interval = BUSY_INTERVAL_MSEC;
|
||||||
server->lastRequestTime = now;
|
|
||||||
} else if( now - server->lastRequestTime < 300 ) {
|
} else if( now - server->lastRequestTime < 300 ) {
|
||||||
interval = IDLE_INTERVAL_MSEC;
|
interval = IDLE_INTERVAL_MSEC;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue