From 21a99210bbd392e27f403dad900c1ce23d99b64b Mon Sep 17 00:00:00 2001
From: Bent Bisballe Nyeng <deva@aasimon.org>
Date: Tue, 10 Jan 2012 10:00:56 +0100
Subject: Make microhttp use one thread per connection.

---
 server/src/httpd.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'server/src')

diff --git a/server/src/httpd.cc b/server/src/httpd.cc
index d70e79e..1c0575a 100644
--- a/server/src/httpd.cc
+++ b/server/src/httpd.cc
@@ -181,7 +181,7 @@ Httpd::~Httpd()
 void Httpd::listen(unsigned short int port,
                    unsigned int cn_limit, unsigned int cn_timeout)
 {
-  int flags = MHD_USE_DEBUG | MHD_USE_SELECT_INTERNALLY;
+  int flags = MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION;
 
   d = MHD_start_daemon(flags, port, NULL, NULL,
                        request_handler, this,
@@ -201,7 +201,7 @@ void Httpd::listen_ssl(unsigned short int port,
                        std::string key, std::string cert,
                        unsigned int cn_limit, unsigned int cn_timeout)
 {
-  int flags = MHD_USE_DEBUG | MHD_USE_SELECT_INTERNALLY | MHD_USE_SSL;
+  int flags = MHD_USE_DEBUG | MHD_USE_THREAD_PER_CONNECTION | MHD_USE_SSL;
 
   d_ssl = MHD_start_daemon(flags, port, NULL, NULL,
                            request_handler, this,
-- 
cgit v1.2.3