asio: Stop acceptor on server::http2::stop

This commit is contained in:
Tatsuhiro Tsujikawa 2016-01-21 19:15:32 +09:00
parent e278893b64
commit 7ca2660a29
1 changed files with 6 additions and 1 deletions

View File

@ -175,7 +175,12 @@ void server::start_accept(tcp::acceptor &acceptor, serve_mux &mux) {
}); });
} }
void server::stop() { io_service_pool_.stop(); } void server::stop() {
io_service_pool_.stop();
for (auto &acceptor : acceptors_) {
acceptor.close();
}
}
void server::join() { io_service_pool_.join(); } void server::join() { io_service_pool_.join(); }