From ac11942f36b8c38244930260a0ead02c9325a75e Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 24 Mar 2021 23:17:40 +0000
Subject: [PATCH] FileHandler hinzugefuegt

---
 src/de/uhilger/avdirektor/handler/StopServerHandler.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/de/uhilger/avdirektor/handler/StopServerHandler.java b/src/de/uhilger/avdirektor/handler/StopServerHandler.java
index 44c4bd6..8812fe8 100644
--- a/src/de/uhilger/avdirektor/handler/StopServerHandler.java
+++ b/src/de/uhilger/avdirektor/handler/StopServerHandler.java
@@ -11,15 +11,17 @@
  *
  * @author ulrich
  */
-public class StopServerHandler implements HttpHandler {
+public class StopServerHandler extends OMXPlayer implements HttpHandler {
 
   @Override
   public void handle(HttpExchange exchange) throws IOException {
     Logger.getLogger(StopServerHandler.class.getName()).info(exchange.getRequestURI().toString());    
+    this.kommando(CMD_STOP);
     String response = "Server stopped";
     exchange.sendResponseHeaders(200, response.length());
     OutputStream os = exchange.getResponseBody();
     os.write(response.getBytes());
+    os.flush();
     os.close();
     Logger.getLogger(StopServerHandler.class.getName()).info("stopping app.");    
     App.stop();

--
Gitblit v1.9.3