stop httpServer before delete; otherwise crash at exit
Change-Id: I5993b0014215ba90623f29e84ba66c8f9a925b84
diff --git a/server/server.hpp b/server/server.hpp
index 0cb3476..408f7b9 100644
--- a/server/server.hpp
+++ b/server/server.hpp
@@ -34,6 +34,9 @@
/// Run the server's io_service loop.
void run();
+ /// Handle a request to stop the server.
+ void handle_stop();
+
private:
/// Initiate an asynchronous accept operation.
void start_accept();
@@ -41,9 +44,6 @@
/// Handle completion of an asynchronous accept operation.
void handle_accept(const boost::system::error_code& e);
- /// Handle a request to stop the server.
- void handle_stop();
-
/// The io_service used to perform asynchronous operations.
boost::asio::io_service io_service_;