UI Server: dedupe some code in helpers
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / UIWebSocketServer.ts
index 5f02f2ea47f9de93276970d53672e078a7fbc9b8..be2961c522584172560a9736b15f6703f10599da 100644 (file)
@@ -46,7 +46,7 @@ export default class UIWebSocketServer extends AbstractUIServer {
   }
 
   public stop(): void {
-    this.server.close();
+    this.chargingStations.clear();
   }
 
   public sendRequest(request: string): void {
@@ -54,6 +54,7 @@ export default class UIWebSocketServer extends AbstractUIServer {
   }
 
   public sendResponse(response: string): void {
+    // TODO: send response only to the client that sent the request
     this.broadcastToClients(response);
   }