|
@@ -2529,8 +2529,14 @@ void FileSprayer::waitForTransferSem(Semaphore & sem)
|
|
|
StringBuffer list;
|
|
|
ForEachItemIn(i, transferSlaves)
|
|
|
transferSlaves.item(i).logIfRunning(list);
|
|
|
+
|
|
|
if (timeSinceProgress>RESPONSE_TIME_TIMEOUT)
|
|
|
- throwError1(RFSERR_TimeoutWaitSlave, list.str());
|
|
|
+ {
|
|
|
+ //Set an error - the transfer threads will check it after a couple of minutes, and then terminate gracefully
|
|
|
+ CriticalBlock lock(errorCS);
|
|
|
+ if (!error)
|
|
|
+ error.setown(MakeStringException(RFSERR_TimeoutWaitSlave, RFSERR_TimeoutWaitSlave_Text, list.str()));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2545,7 +2551,10 @@ void FileSprayer::addTarget(unsigned idx, INode * node)
|
|
|
}
|
|
|
|
|
|
bool FileSprayer::isAborting()
|
|
|
-{
|
|
|
+{
|
|
|
+ if (aborting || error)
|
|
|
+ return true;
|
|
|
+
|
|
|
unsigned nowTick = msTick();
|
|
|
if (abortChecker && (nowTick - lastAbortCheckTick >= abortCheckFrequency))
|
|
|
{
|