Skip to content

Commit

Permalink
check if bot online before checking for outstanding trades (#2887)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudokhvist authored Apr 23, 2023
1 parent a44e9ab commit 7721106
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ArchiSteamFarm/Steam/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,11 @@ private async void OnSharedLibraryLockStatus(ArchiHandler.SharedLibraryLockStatu
await CheckOccupationStatus().ConfigureAwait(false);
}

private void OnTradeCheckTimer(object? state = null) => Utilities.InBackground(Trading.OnNewTrade);
private void OnTradeCheckTimer(object? state = null) {
if (IsConnectedAndLoggedOn) {
Utilities.InBackground(Trading.OnNewTrade);
}
}

private void OnUserNotifications(UserNotificationsCallback callback) {
ArgumentNullException.ThrowIfNull(callback);
Expand Down

0 comments on commit 7721106

Please sign in to comment.