repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: avoid worker-threads restart at error during startup
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ChargingStation.ts
diff --git
a/src/charging-station/ChargingStation.ts
b/src/charging-station/ChargingStation.ts
index 5a049ec5b9195b071f4920f117a6ea4e4ca59a02..f92ea2b6e96863c01ecca86ecaa91891592073be 100644
(file)
--- a/
src/charging-station/ChargingStation.ts
+++ b/
src/charging-station/ChargingStation.ts
@@
-28,6
+28,7
@@
import {
} from './ConfigurationKeyUtils';
import {
buildConnectorsMap,
} from './ConfigurationKeyUtils';
import {
buildConnectorsMap,
+ checkChargingStation,
checkConnectorsConfiguration,
checkStationInfoConnectorStatus,
checkTemplate,
checkConnectorsConfiguration,
checkStationInfoConnectorStatus,
checkTemplate,
@@
-776,15
+777,11
@@
export class ChargingStation {
): void {
options = {
handshakeTimeout: secondsToMilliseconds(this.getConnectionTimeout()),
): void {
options = {
handshakeTimeout: secondsToMilliseconds(this.getConnectionTimeout()),
- ...
(this.stationInfo?.wsOptions ?? {})
,
+ ...
this.stationInfo?.wsOptions
,
...options,
};
params = { ...{ closeOpened: false, terminateOpened: false }, ...params };
...options,
};
params = { ...{ closeOpened: false, terminateOpened: false }, ...params };
- if (this.started === false && this.starting === false) {
- logger.warn(
- `${this.logPrefix()} Cannot open OCPP connection to URL ${this.wsConnectionUrl.toString()}
- on stopped charging station`,
- );
+ if (!checkChargingStation(this, this.logPrefix())) {
return;
}
if (
return;
}
if (