Index: slimserver.pl =================================================================== --- slimserver.pl (revision 4673) +++ slimserver.pl (working copy) @@ -1114,8 +1114,18 @@ # swapping. So try and keep our memory image in RAM and not swap out. sub keepSlimServerInMemory { - $::d_server && msg("Requesting web page to keep SlimServer unswapped.\n"); + my $interval = Slim::Utils::Prefs::get('keep-unswapped-interval'); + if (!(defined($interval))) + { + $interval = 30 * 60; + Slim::Utils::Prefs::set('keep-unswapped-interval', $interval); + } + $::d_server && msg("Requesting web page to keep SlimServer unswapped, re-request interval is $interval seconds.\n"); + + # Disabled if interval set to less than zero seconds + return if ($interval <= 0); + my $url = ''; my $port = Slim::Utils::Prefs::get('httpport'); @@ -1135,7 +1145,7 @@ $http->get($url); # Check every half hour - Slim::Utils::Timers::setTimer(0, Time::HiRes::time() + 1800, \&keepSlimServerInMemory); + Slim::Utils::Timers::setTimer(0, Time::HiRes::time() + $interval, \&keepSlimServerInMemory); } #------------------------------------------