[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] always keep one file-ioslave around
From: aleXXX <alexander.neundorf () gmx ! net>
Date: 2002-05-01 21:51:50
[Download RAW message or body]
Hi,
since the file ioslave is a very basic element, I think it would be a good
idea to keep at least one of them always around, so that it hasn't got to be
restarted. The attached patch for kdelibs/kio/kio/scheduler.cpp does this.
Bye
Alex
--- scheduler.cpp 2002/03/14 19:40:06 1.86
+++ scheduler.cpp 2002/05/01 21:20:49
@@ -623,16 +623,24 @@
void Scheduler::slotCleanIdleSlaves()
{
+ bool keepFileSlave=true;
for(Slave *slave = idleSlaves->first();slave;)
{
if (slave->idleTime() >= MAX_SLAVE_IDLE)
{
+ if ((slave->slaveProtocol()=="file") && (keepFileSlave))
+ {
+ keepFileSlave=false;
+ }
+ else
+ {
// kdDebug(7006) << "Removing idle slave: " <<
slave->slaveProtocol() << " " << slave->host() << endl; Slave
*removeSlave = slave;
slave = idleSlaves->next();
idleSlaves->removeRef(removeSlave);
slaveList->removeRef(removeSlave);
delete removeSlave;
+ };
}
else
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic