File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ internal sealed class Bot {
6868
6969 internal bool KeepRunning { get ; private set ; }
7070
71- private bool InvalidPassword , LoggedInElsewhere , FirstTradeSent ;
71+ private bool InvalidPassword , LoggedInElsewhere , FirstTradeSent , SkipFirstShutdown ;
7272 private string AuthCode , TwoFactorCode ;
7373
7474 internal static async Task RefreshCMs ( uint cellID ) {
@@ -320,7 +320,11 @@ internal async Task OnFarmingFinished(bool farmedSomething) {
320320 }
321321
322322 if ( BotConfig . ShutdownOnFarmingFinished ) {
323- Stop ( ) ;
323+ if ( SkipFirstShutdown ) {
324+ SkipFirstShutdown = false ;
325+ } else {
326+ Stop ( ) ;
327+ }
324328 }
325329 }
326330
@@ -1130,6 +1134,7 @@ private async Task<string> ResponseStart(ulong steamID) {
11301134 return "That bot instance is already running!" ;
11311135 }
11321136
1137+ SkipFirstShutdown = true ;
11331138 await Start ( ) . ConfigureAwait ( false ) ;
11341139 return "Done!" ;
11351140 }
You can’t perform that action at this time.
0 commit comments