File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -261,8 +261,8 @@ internal async Task AcceptConfirmations(bool accept, Steam.ConfirmationDetails.E
261261 }
262262
263263 if ( ( acceptedSteamID != 0 ) || ( ( acceptedTradeIDs != null ) && ( acceptedTradeIDs . Count > 0 ) ) ) {
264- List < Task < Steam . ConfirmationDetails > > detailsTasks = confirmations . Select ( BotDatabase . MobileAuthenticator . GetConfirmationDetails ) . ToList ( ) ;
265- Steam . ConfirmationDetails [ ] detailsResults = await Task . WhenAll ( detailsTasks ) . ConfigureAwait ( false ) ;
264+ List < Task < Steam . ConfirmationDetails > > tasks = confirmations . Select ( BotDatabase . MobileAuthenticator . GetConfirmationDetails ) . ToList ( ) ;
265+ Steam . ConfirmationDetails [ ] detailsResults = await Task . WhenAll ( tasks ) . ConfigureAwait ( false ) ;
266266
267267 HashSet < uint > ignoredConfirmationIDs = new HashSet < uint > ( ) ;
268268 foreach ( Steam . ConfirmationDetails details in detailsResults . Where ( details => ( details != null ) && (
@@ -282,8 +282,11 @@ internal async Task AcceptConfirmations(bool accept, Steam.ConfirmationDetails.E
282282 }
283283 }
284284
285- List < Task < bool > > tasks = confirmations . Select ( confirmation => BotDatabase . MobileAuthenticator . HandleConfirmation ( confirmation , accept ) ) . ToList ( ) ;
286- await Task . WhenAll ( tasks ) . ConfigureAwait ( false ) ;
285+ // This could be done in parallel, but for some reason Steam allows only one confirmation being accepted at the time
286+ // Therefore, even though no physical barrier stops us from doing so, we execute this synchronously
287+ foreach ( MobileAuthenticator . Confirmation confirmation in confirmations ) {
288+ await BotDatabase . MobileAuthenticator . HandleConfirmation ( confirmation , accept ) . ConfigureAwait ( false ) ;
289+ }
287290 }
288291
289292 internal async Task < bool > RefreshSession ( ) {
You can’t perform that action at this time.
0 commit comments