File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -309,13 +309,7 @@ export default class AutomaticTransactionGenerator {
309309 connectorId,
310310 idTag,
311311 } ) ;
312- this . connectorsStatus . get ( connectorId ) . startTransactionRequests ++ ;
313- if ( startResponse ?. idTagInfo ?. status === AuthorizationStatus . ACCEPTED ) {
314- this . connectorsStatus . get ( connectorId ) . acceptedStartTransactionRequests ++ ;
315- } else {
316- logger . warn ( this . logPrefix ( connectorId ) + ' start transaction rejected' ) ;
317- this . connectorsStatus . get ( connectorId ) . rejectedStartTransactionRequests ++ ;
318- }
312+ this . handleStartTransactionResponse ( connectorId , startResponse ) ;
319313 PerformanceStatistics . endMeasure ( measureId , beginId ) ;
320314 return startResponse ;
321315 }
@@ -332,6 +326,7 @@ export default class AutomaticTransactionGenerator {
332326 connectorId,
333327 idTag,
334328 } ) ;
329+ this . handleStartTransactionResponse ( connectorId , startResponse ) ;
335330 PerformanceStatistics . endMeasure ( measureId , beginId ) ;
336331 return startResponse ;
337332 }
@@ -382,4 +377,17 @@ export default class AutomaticTransactionGenerator {
382377 } :`
383378 ) ;
384379 }
380+
381+ private handleStartTransactionResponse (
382+ connectorId : number ,
383+ startResponse : StartTransactionResponse
384+ ) : void {
385+ this . connectorsStatus . get ( connectorId ) . startTransactionRequests ++ ;
386+ if ( startResponse ?. idTagInfo ?. status === AuthorizationStatus . ACCEPTED ) {
387+ this . connectorsStatus . get ( connectorId ) . acceptedStartTransactionRequests ++ ;
388+ } else {
389+ logger . warn ( this . logPrefix ( connectorId ) + ' start transaction rejected' ) ;
390+ this . connectorsStatus . get ( connectorId ) . rejectedStartTransactionRequests ++ ;
391+ }
392+ }
385393}
You can’t perform that action at this time.
0 commit comments