From 1f474f377b2ea96646f0d01fcfde4b7da8c28980 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 15 Jul 2017 14:41:57 +0200 Subject: [PATCH] Made Server::stop exception safe --- server_http.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server_http.hpp b/server_http.hpp index bd1f0683..161381fc 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -418,7 +418,8 @@ namespace SimpleWeb { /// Stop accepting new requests, and close current connections. void stop() { if(acceptor) { - acceptor->close(); + error_code ec; + acceptor->close(ec); { std::unique_lock lock(*connections_mutex);