X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fui-server%2FAbstractUIServer.ts;h=a1375cea3786d131013685e39786032e7f1e4d6f;hb=a474cbe107fedbe17398e5d21f852f0ce0d5ca2f;hp=cd6167389cf159d44c3b6118e20d3446473d01d3;hpb=5199f9fdf202eb534948f165a0994e1993675aa8;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ui-server/AbstractUIServer.ts b/src/charging-station/ui-server/AbstractUIServer.ts index cd616738..a1375cea 100644 --- a/src/charging-station/ui-server/AbstractUIServer.ts +++ b/src/charging-station/ui-server/AbstractUIServer.ts @@ -21,12 +21,14 @@ import { export abstract class AbstractUIServer { public readonly chargingStations: Map + public readonly chargingStationTemplates: Set protected readonly httpServer: Server | Http2Server protected readonly responseHandlers: Map protected readonly uiServices: Map public constructor (protected readonly uiServerConfiguration: UIServerConfiguration) { this.chargingStations = new Map() + this.chargingStationTemplates = new Set() switch (this.uiServerConfiguration.version) { case ApplicationProtocolVersion.VERSION_11: this.httpServer = new Server() @@ -57,7 +59,11 @@ export abstract class AbstractUIServer { public stop (): void { this.stopHttpServer() + for (const uiService of this.uiServices.values()) { + uiService.stop() + } this.chargingStations.clear() + this.chargingStationTemplates.clear() } public async sendInternalRequest (request: ProtocolRequest): Promise {