From 90d854759e7328cefb79759fe0cc0e7d9cad0e53 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 24 Nov 2015 10:46:51 +0100 Subject: [PATCH] Server::start-stop-start should now work given that appropriate delays are set between the operations (at least start and stop). --- server_http.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server_http.hpp b/server_http.hpp index afb36c0..769b3de 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -146,6 +146,8 @@ namespace SimpleWeb { accept(); + if(io_service.stopped()) + io_service.reset(); //If num_threads>1, start m_io_service.run() in (num_threads-1) threads for thread-pooling threads.clear(); for(size_t c=1;c