Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
public async stop(): Promise<void> {
if (isMainThread && this.started === true) {
- await this.uiServer?.sendBroadcastChannelRequest(
+ await this.uiServer?.sendRequestOnBroadcastChannel(
this.uiServer.buildProtocolRequest(
Utils.generateUUID(),
ProcedureName.STOP_CHARGING_STATION,
this.chargingStations.clear();
}
- public async sendBroadcastChannelRequest(request: ProtocolRequest): Promise<ProtocolResponse> {
+ public async sendRequestOnBroadcastChannel(request: ProtocolRequest): Promise<ProtocolResponse> {
const protocolVersion = ProtocolVersion['0.0.1'];
this.registerProtocolVersionUIService(protocolVersion);
return this.uiServices.get(protocolVersion)?.requestHandler(request);
)
)
.then((protocolResponse: ProtocolResponse) => {
- if (Utils.isNullOrUndefined(protocolResponse)) {
+ if (!Utils.isNullOrUndefined(protocolResponse)) {
this.sendResponse(protocolResponse);
}
})