// Enable unconditionally for now
handleUnhandledRejection();
handleUncaughtException();
- this.initializedCounters = false;
this.started = false;
+ this.initializedCounters = false;
this.initializeCounters();
this.workerImplementation = null;
this.workerScript = path.join(
this.workerImplementation = null;
this.uiServer?.stop();
await this.storage?.close();
+ this.resetCounters();
this.initializedCounters = false;
this.started = false;
} else {
private initializeCounters() {
if (this.initializedCounters === false) {
- this.numberOfChargingStationTemplates = 0;
- this.numberOfChargingStations = 0;
+ this.resetCounters();
const stationTemplateUrls = Configuration.getStationTemplateUrls();
if (Utils.isNotEmptyArray(stationTemplateUrls)) {
this.numberOfChargingStationTemplates = stationTemplateUrls.length;
);
process.exit(exitCodes.noChargingStationTemplates);
}
- this.numberOfStartedChargingStations = 0;
this.initializedCounters = true;
}
}
+ private resetCounters(): void {
+ this.numberOfChargingStationTemplates = 0;
+ this.numberOfChargingStations = 0;
+ this.numberOfStartedChargingStations = 0;
+ }
+
private async startChargingStation(
index: number,
stationTemplateUrl: StationTemplateUrl