summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi/fcgi.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-03 09:25:38 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-03 09:25:38 +0200
commitf49cd79ed8cdb1cb8988aad2cfa3f22d4866fb27 (patch)
treeafc33b8232ba9e0bf8871657c0e8bdd968e3aedc /plugins/fcgi/fcgi.h
parent5f39c4bcd3ea85ce6a30446d23ccae0542bfbdaf (diff)
FCGI: Fix multithreading for m_socket
Diffstat (limited to 'plugins/fcgi/fcgi.h')
-rw-r--r--plugins/fcgi/fcgi.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/fcgi/fcgi.h b/plugins/fcgi/fcgi.h
index 22d7fba..b881aec 100644
--- a/plugins/fcgi/fcgi.h
+++ b/plugins/fcgi/fcgi.h
@@ -4,8 +4,9 @@
#include <boost/asio.hpp>
-#include <set>
#include <cstdint>
+#include <mutex>
+#include <set>
// TODO: multithreading
class FCGI_ID
@@ -59,6 +60,8 @@ class fcgi_plugin: public webserver_plugin_interface
FCGI_ID m_fcgi_id;
boost::asio::io_context m_io_context;
boost::asio::ip::tcp::resolver m_resolver;
+
+ std::mutex m_socket_mutex; // guard m_socket use in different threads
boost::asio::ip::tcp::socket m_socket;
public: