Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Made Server::stop exception safe
Browse files Browse the repository at this point in the history
  • Loading branch information
eidheim committed Jul 15, 2017
1 parent 35ea8a9 commit 1f474f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server_http.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> lock(*connections_mutex);
Expand Down

0 comments on commit 1f474f3

Please sign in to comment.