-// Partial Copyright Jerome Benoit. 2021. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
import { AsyncResource } from 'async_hooks';
+import type ChargingStation from './ChargingStation';
+import { ChargingStationUtils } from './ChargingStationUtils';
import BaseError from '../exception/BaseError';
import PerformanceStatistics from '../performance/PerformanceStatistics';
import {
import Constants from '../utils/Constants';
import logger from '../utils/Logger';
import Utils from '../utils/Utils';
-import type ChargingStation from './ChargingStation';
-import { ChargingStationUtils } from './ChargingStationUtils';
const moduleName = 'AutomaticTransactionGenerator';
}
private checkChargingStation(connectorId?: number): boolean {
- if (this.chargingStation.started === false) {
+ if (this.chargingStation.started === false && this.chargingStation.starting === false) {
logger.warn(`${this.logPrefix(connectorId)} charging station is stopped, cannot proceed`);
+ return false;
}
- return this.chargingStation.started;
+ return true;
}
}