Harden exit command
[pazpar2-moved-to-github.git] / src / http_command.c
index 9fc50a8..65be27c 100644 (file)
@@ -405,7 +405,8 @@ static void cmd_exit(struct http_channel *c)
 
     response_open(c, "exit");
     response_close(c, "exit");
-    http_close_server(c->server);
+    if (global_parameters.debug_mode)
+        http_close_server(c->server);
 }
 
 static void cmd_init(struct http_channel *c)