diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index 3f76f46a2709527e6c6a00b182e04e2cf056ba36..88ebd5dcd6dd3ab33af245dd03b5c0fddb6d6a44 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -32,6 +32,7 @@ namespace ATxService private RoboCommand _roboCommand; private long _txCurFileSize; private int _txCurFileProgress; + private int _waitCyclesBeforeNextTx; private DateTime _lastUserDirCheck = DateTime.MinValue; @@ -579,6 +580,14 @@ namespace ATxService return; } + // give the system some time before starting the next transfer: + if (_waitCyclesBeforeNextTx > 0) { + Log.Debug("Waiting {0} more cycles before starting the next transfer...", + _waitCyclesBeforeNextTx); + _waitCyclesBeforeNextTx--; + return; + } + // dispatch the next directory from "processing" for transfer: try { StartTransfer(subdirs[0].FullName); diff --git a/ATxService/RoboCommand.cs b/ATxService/RoboCommand.cs index b89188e43268da945f9001d3fece1926518c2599..a220cd219dc794e2773123fad76842a2a4a763f5 100644 --- a/ATxService/RoboCommand.cs +++ b/ATxService/RoboCommand.cs @@ -164,6 +164,7 @@ namespace ATxService _txCurFileProgress = 0; _roboCommand.Dispose(); _status.TransferInProgress = false; + _waitCyclesBeforeNextTx = 2; } /// <summary>