Merge branch 'main' into reservation-feature
[e-mobility-charging-stations-simulator.git] / src / charging-station / ui-server / ui-services / AbstractUIService.ts
index 0531011f95b6397bbbb432f932de31db7b2cf33a..1ec6cf93b20e77363f08ecbb79cb9c10ed9cf656 100644 (file)
@@ -116,7 +116,9 @@ export abstract class AbstractUIService {
   // }
 
   public sendResponse(messageId: string, responsePayload: ResponsePayload): void {
-    this.uiServer.sendResponse(this.uiServer.buildProtocolResponse(messageId, responsePayload));
+    if (this.uiServer.hasResponseHandler(messageId)) {
+      this.uiServer.sendResponse(this.uiServer.buildProtocolResponse(messageId, responsePayload));
+    }
   }
 
   public logPrefix = (modName: string, methodName: string): string => {