aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-13 23:51:15 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-13 23:51:15 +0200
commitf90a745abe0223d591567197983ddf60fcf70f59 (patch)
treed4653668a123a4aa5cbb20a55b8f7e2ec0fd9637 /src/mint/taler-mint-httpd.c
parent6582e07c476f028eaf27d964efd90e22609ffb2a (diff)
add -t option to httpd
Diffstat (limited to 'src/mint/taler-mint-httpd.c')
-rw-r--r--src/mint/taler-mint-httpd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c
index 14fde3ac7..cf825e6b1 100644
--- a/src/mint/taler-mint-httpd.c
+++ b/src/mint/taler-mint-httpd.c
@@ -75,6 +75,11 @@ struct TALER_MINTDB_Plugin *TMH_plugin;
int TMH_test_mode;
/**
+ * Default timeout in seconds for HTTP requests.
+ */
+static unsigned int connection_timeout = 30;
+
+/**
* The HTTP Daemon.
*/
static struct MHD_Daemon *mydaemon;
@@ -552,6 +557,9 @@ main (int argc,
{'d', "mint-dir", "DIR",
"mint directory with configuration and keys for operating the mint", 1,
&GNUNET_GETOPT_set_filename, &TMH_mint_directory},
+ {'t', "timeout", "SECONDS",
+ "after how long do connections timeout by default (in seconds)", 1,
+ &GNUNET_GETOPT_set_uint, &connection_timeout},
#if HAVE_DEVELOPER
{'f', "file-input", "FILENAME",
"run in test-mode using FILENAME as the HTTP request to process", 1,
@@ -588,6 +596,7 @@ main (int argc,
NULL, NULL,
&handle_mhd_request, NULL,
MHD_OPTION_NOTIFY_COMPLETED, &handle_mhd_completion_callback, NULL,
+ MHD_OPTION_CONNECTION_TIMEOUT, connection_timeout,
#if HAVE_DEVELOPER
MHD_OPTION_NOTIFY_CONNECTION, &connection_done, NULL,
#endif