Harden exit command
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 11 Dec 2012 13:13:23 +0000 (14:13 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 11 Dec 2012 13:13:23 +0000 (14:13 +0100)
May only be executed in debug mode (-X option).

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)